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 tool_choice being dropped in inspect_model_request #1438

Conversation

alexb-palisaderesearch
Copy link
Contributor

This PR contains:

  • New features
  • Changes to dev-tools e.g. CI config / github tooling
  • Docs
  • Bug fixes
  • Code refactor

What is the current behavior?

tool_choice passed from OpenAI().chat.completions.create(tool_choice=...) gets replaced with None.

What is the new behavior?

tool_choice gets preserved and passed down to model.generate().

Does this PR introduce a breaking change?

No.

Other information:

@jjallaire
Copy link
Collaborator

Thanks for this! The types are actually not identical so we can't just assign them straight up. Here's a variation that does the requisite mapping: #1450.

@jjallaire jjallaire closed this Mar 7, 2025
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