Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT]: Revamping the tools #14

Open
XuhuiZhou opened this issue Jul 17, 2024 · 0 comments · May be fixed by #23
Open

[FEAT]: Revamping the tools #14

XuhuiZhou opened this issue Jul 17, 2024 · 0 comments · May be fixed by #23
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@XuhuiZhou
Copy link
Owner

Description

The current tool in ToolEmu is inherited from their self-created FunctionTool

class FunctionTool(BaseTool):
    """
    Function tool is defined according to our specification that resembles Python function docstring, see `tool_interface.md`.
    """

    name: str = None
    summary: str = None
    parameters: List[ArgParameter] = None
    returns: List[ArgReturn] = None
    exceptions: List[ArgException] = None
    description: str = None

The ArgParameter, ArgReturn, and ArgException are essential Typedict, which could be error-prone and hard to verify.
e.g.,

class ArgException(TypedDict):
    """The exception for a tool"""

    name: str
    description: 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:

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

@XuhuiZhou XuhuiZhou added enhancement New feature or request help wanted Extra attention is needed labels Jul 17, 2024
@ProKil ProKil linked a pull request Jul 27, 2024 that will close this issue
6 tasks
@ProKil ProKil linked a pull request Jul 27, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants