You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting the error 'Validation error at #/stream_options: Extra inputs are not permitted' when adding extra_body and stream options at the same time
#2296
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.
Confirm this is an issue with the Python library and not an underlying OpenAI API
This is an issue with the Python library
Describe the bug
I am trying get the token usage of a streamed response. It has an extra_body to get info from a Azure Search Service index. When I use the stream_options={ "include_usage" : True} it works and returns the token usage and when i use the extra body with my Azure Search Service it returns an answer using the data. But when use both of them at the same time i get this error 'Validation error at #/stream_options: Extra inputs are not permitted'.
To Reproduce
To reproduce the error just run the code snippet below.
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
I am trying get the token usage of a streamed response. It has an extra_body to get info from a Azure Search Service index. When I use the stream_options={ "include_usage" : True} it works and returns the token usage and when i use the extra body with my Azure Search Service it returns an answer using the data. But when use both of them at the same time i get this error 'Validation error at #/stream_options: Extra inputs are not permitted'.
To Reproduce
To reproduce the error just run the code snippet below.
Code snippets
OS
Windows
Python version
Python v311.3
Library version
openai 1.72.0
The text was updated successfully, but these errors were encountered: