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

fix: adjust default tool choice #2244

Merged
merged 4 commits into from
Jul 19, 2024
Merged

fix: adjust default tool choice #2244

merged 4 commits into from
Jul 19, 2024

Conversation

drbh
Copy link
Collaborator

@drbh drbh commented Jul 18, 2024

This PR fixes a regression with the default and auto tool_choice. These changes will ensure that auto tools work, and to use OneOf in the case tools are provided without a tool_choice

@drbh
Copy link
Collaborator Author

drbh commented Jul 18, 2024

This PR has been updated to improve the syntax of the default tool choice, which fixes issues with tool_choice="auto", better tool error messages and other refactors.

  • added NoTool option and ToolChoice struct with improved deserialization
  • refactored ToolGrammar::apply for better error handling
  • enhanced tool call parsing in chat completions endpoint
  • added ToSchema derive for ToolChoice
  • added ToolChoice schema to OpenAPI documentation

Copy link
Member

@danieldk danieldk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@drbh drbh merged commit 68a9685 into main Jul 19, 2024
9 checks passed
@drbh drbh deleted the fix-tool-choice-default branch July 19, 2024 15:12
ErikKaum pushed a commit that referenced this pull request Jul 25, 2024
* fix: adjust default tool choice

* feat: improve tool choice syntax and response parsing/errors

* fix: remove dev tests

* feat: add ToolChoice to docs
ErikKaum pushed a commit that referenced this pull request Jul 26, 2024
* fix: adjust default tool choice

* feat: improve tool choice syntax and response parsing/errors

* fix: remove dev tests

* feat: add ToolChoice to docs
yuanwu2017 pushed a commit to yuanwu2017/tgi-gaudi that referenced this pull request Sep 26, 2024
* fix: adjust default tool choice

* feat: improve tool choice syntax and response parsing/errors

* fix: remove dev tests

* feat: add ToolChoice to docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants