You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current tool in ToolEmu is inherited from their self-created FunctionTool
classFunctionTool(BaseTool):
""" Function tool is defined according to our specification that resembles Python function docstring, see `tool_interface.md`. """name: str=Nonesummary: str=Noneparameters: List[ArgParameter] =Nonereturns: List[ArgReturn] =Noneexceptions: List[ArgException] =Nonedescription: str=None
The ArgParameter, ArgReturn, and ArgException are essential Typedict, which could be error-prone and hard to verify.
e.g.,
classArgException(TypedDict):
"""The exception for a tool"""name: strdescription: str
I am thinking of using a more elegant solution, basically, it would be good to turn ArgParameter, ArgReturn, and ArgException all into Pydantic structure so that we can easily verify the tool calling behavior of LLMs with Pydantic's internal verifier:
Description
The current tool in ToolEmu is inherited from their self-created
FunctionTool
The
ArgParameter
,ArgReturn
, andArgException
are essentialTypedict
, which could be error-prone and hard to verify.e.g.,
I am thinking of using a more elegant solution, basically, it would be good to turn
ArgParameter
,ArgReturn
, andArgException
all into Pydantic structure so that we can easily verify the tool calling behavior of LLMs with Pydantic's internal verifier:https://docs.pydantic.dev/latest/concepts/json/#json-parsing
Please let me know what do you think! @frankxu2004 @ProKil @GloriaXimingLu @liweijiang
Additional Information
No response
The text was updated successfully, but these errors were encountered: