Skip to content

Support Tuple for function tool signature #3575

@kevinkassimo

Description

@kevinkassimo

** Please make sure you read the contribution guide and file the issues in the right place. **
Contribution guide.

Is your feature request related to a problem? Please describe.
Defining tools with tuple arguments result in the following error:

ValueError: Failed to parse the parameter some_param: Tuple[float, float] of function some_tool for automatic function calling. Automatic function calling works best with simpler function signature schema, consider manually parsing your function declaration for function some_tool

Describe the solution you'd like
Allow tuple typed function signature to be usable.

Describe alternatives you've considered
Technically is can be replaced with a list and describe the length expectation. Though this can cause some inconvenience since tuple is considered a fundamental simple type in Python

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs review[Status] The PR/issue is awaiting review from the maintainertools[Component] This issue is related to tools

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions