-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix: improve tool type, bump pydantic and outlines #1650
Conversation
13f2560
to
7ad4a62
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits.
{ | ||
"function": { | ||
"description": None, | ||
"name": "tools", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the "name" here should be "get_current_weather"
{ | ||
"function": { | ||
"description": None, | ||
"name": "tools", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also here the "name" here should be "get_current_weather"
Thanks @drbh for your PR, I've noticed that you changed the type of "tool_calls" from an object to a list, which is great.
Would it be feasible to to have the tool_grammar in the format of {name:"",arguments:{}} instead of {function:{}} ?
this would instruct the LLM to respond with the choosen function name and it's argument, and it can be parsed later here
I never worked with Rust, otherwise I would subbmited a PR! |
Hi @joumenharzli thanks for highlighting that issue! Unfortunately the current expected value is Updating the tool's formatting is interesting, and in general the currently implementation is a bit rigid. However a change like that is outside of the scope of this PR and should be addressed in a new PR. I'll open a new issue to continue this conversation: #1657 and I'll open a new PR when we have a clear path forward |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR resolves a couple - [X] adjusts the tool response to align with openai's tools response type - [X] bumps pydantic to `2.6.4` in all apps (resolves dependency issue when running tests) - [X] bump `outlines` version and fix import for new name
This PR resolves a couple
2.6.4
in all apps (resolves dependency issue when running tests)outlines
version and fix import for new name