Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: support for customizing “tool_choice” in OpenAI#785

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
leseb wants to merge1 commit intopydantic:mainfromleseb:fix-224

Conversation

leseb
Copy link

@lesebleseb commentedJan 27, 2025
edited
Loading

1016c92 feat: support for customizing “tool_choice” in OpenAI

commit1016c92
Author: Sébastien Hanseb@redhat.com
Date: Mon Jan 27 16:52:45 2025 +0100

feat: support for customizing “tool_choice” in OpenAIThe ModelSettings class uses a TypedDict as its underlying type, providingflexibility to add options beyond the predefined attributes.Before generating chat completions, the code now checks if tool_choice is setin ModelSettings and applies it accordingly.Fixes: https://github.com/pydantic/pydantic-ai/issues/224Signed-off-by: Sébastien Han <seb@redhat.com>

Fixes:#224

The ModelSettings class uses a TypedDict as its underlying type, providingflexibility to add options beyond the predefined attributes.Before generating chat completions, the code now checks if tool_choice is setin ModelSettings and applies it accordingly.Fixes:pydantic#224Signed-off-by: Sébastien Han <seb@redhat.com>
@sydney-runkle
Copy link
Contributor

I think we'll want to customize this onOpenAIModelSettings, given that tool choice format is specific to different model providers.

@leseb
Copy link
Author

I think we'll want to customize this onOpenAIModelSettings, given that tool choice format is specific to different model providers.

@sydney-runkle Thanks for looking into this. Are you referring to exposing a setting like ModelSettings? I’m curious about how frequently users would need to adjust this flag. Thanks!

@sydney-runkle
Copy link
Contributor

Yes, we'll want to expose a setting and document it. Specifically, we'll probably want to add this toOpenAIModelSettings.

leseb reacted with thumbs up emoji

@leseb
Copy link
Author

I no longer have the time to continue working on this, so I’ll be closing it.

@lesebleseb closed thisJan 29, 2025
@lesebleseb deleted the fix-224 branchJanuary 29, 2025 16:38
@webcoderz
Copy link

thanks@leseb this seems to work..

leseb reacted with heart emoji

@webcoderz
Copy link

@sydney-runkle see:#825 i added tool_choice to ModelSettings as requested.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Tool calling issues with vllm
3 participants
@leseb@sydney-runkle@webcoderz

[8]ページ先頭

©2009-2025 Movatter.jp