-
Notifications
You must be signed in to change notification settings - Fork 654
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
add user
mapping in openai chat completion
#1174
base: main
Are you sure you want to change the base?
add user
mapping in openai chat completion
#1174
Conversation
|
|
Why should it be here instead of there? For reference. |
From the OpenAI documentation : https://platform.openai.com/docs/api-reference/chat/create Also if you refer the It makes sense to make it part of |
@Kludex Could you get a chance to review this? |
Added the fix as documented in issue :
#1156
This pull request includes a small change to the
pydantic_ai_slim/pydantic_ai/models/openai.py
file. The change adds a new parameter to the_completions_create
method to include theuser
setting frommodel_settings
.pydantic_ai_slim/pydantic_ai/models/openai.py
: Added theuser
parameter to the_completions_create
method to include it in the model settings.Following the changes we can pass on the
user
field as part of model setting and pass the model setting in the agentExample :