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

openai[minor]: Force tool usage through tool_choice #4605

Merged
merged 2 commits into from
Mar 4, 2024

Conversation

bracesproul
Copy link
Member

Turns out setting tool_choice: "auto" does not always guarantee tool usage, and is different between models.

This will force then model to use the provided tool.

Copy link

vercel bot commented Mar 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 4, 2024 1:38am
langchainjs-docs ✅ Ready (Inspect) Visit Preview Mar 4, 2024 1:38am

@bracesproul bracesproul marked this pull request as ready for review March 4, 2024 01:30
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. auto:improvement Medium size change to existing code to handle new use-cases labels Mar 4, 2024
@bracesproul bracesproul merged commit ea1f682 into main Mar 4, 2024
17 checks passed
@bracesproul bracesproul deleted the brace/structured-output-force-tool branch March 4, 2024 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:improvement Medium size change to existing code to handle new use-cases size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant