-
Notifications
You must be signed in to change notification settings - Fork 4
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
Update openai sdk version #195
Comments
Hi @artur-krawczyk-epam, what is the model you are requesting that returns 400 error response? Is it Azure OpenAI model? |
Hi @adubovik yes, it's gpt-4o |
@artur-krawczyk @artur-krawczyk-epam I'm struggling to reproduce the error. Could you please provide the exact request that leads to the error? It could be a Python program or a curl request. |
@adubovik sure, this is Python code that breaks:
I've masked the |
@artur-krawczyk-epam @artur-krawczyk Could you please elaborate how exactly this code breaks? I got the following error message when I ran the provided code on our prod env:
and after I fixed the api version to
So it appear to be a configuration issue. Could you please provide more details about your environment:
|
@adubovik my error is a little different than what you got initially, it is:
Changing the API version did not help.
|
It seems that openai sdk is not up to date in ai-dial-adapter-openai https://github.com/epam/ai-dial-adapter-openai .
Official example from microsoft https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/function-calling#single-toolfunction-calling-example doesn't work with the current version of openai adapter.
Whereas calling Azure OpenAI service directly example works with the example from MSFT documentation.
In our opinion the problem is related with
https://platform.openai.com/docs/api-reference/chat/create
and tool_choice parameter
Error:
openai.BadRequestError: Error code: 400 - {'error': {'message': 'Your request contained invalid structure on path messages.1.refusal. extra fields not permitted', 'type': 'invalid_request_error', 'code': '400'}}
The text was updated successfully, but these errors were encountered: