Skip to content

Support multiple tools #1540

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

Open
indigoviolet opened this issue May 19, 2025 · 0 comments
Open

Support multiple tools #1540

indigoviolet opened this issue May 19, 2025 · 0 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@indigoviolet
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Tool use is actually pretty hard to figure out in Instructor because it does something far from the native APIs. Because instructor takes over the tool pathway in the default mode to handle the response model, it requires a custom union-containing type (https://python.useinstructor.com/concepts/unions/?h=union) to support an agent that will return a response model but might also invoke tools (which is a pretty standard pattern).

I'm also concerned that this pattern is not what the models are tuned for, so there might be a slight drop in quality.

Describe the solution you'd like
Instead, I think it should explicitly support a response_model and a list of tool models - and instructor should return a tool model if it was a tool use, or the response model otherwise (perhaps with metadata to distinguish these cases)

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

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

@github-actions github-actions bot added enhancement New feature or request question Further information is requested labels May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant