-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
beta.chat.completions.parse returns unhandled ValidationError #1763
Comments
Thanks for the report, it looks like your example script isn't fully complete, could you share a full script? |
Hi, thanks for the quick reply! Sadly I can't provide a full script for privacy reasons but I'll be happy to share any information you need for identifying the issue.
Please let me know if there's anything else you need. |
Could you share a request ID from a failing request? https://github.com/openai/openai-python#request-ids |
From seeing the logs of our application I understand the call to |
ahhhh right sorry, if you don't already have debug logging enabled, could you enable it? https://github.com/openai/openai-python#logging that should show a request ID in the logs |
Sure thing! |
Hi there! Any updates here?
I've solved this in the meantime with a tenacity retry, but it's adding latency and calls which isn't ideal...
|
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
In some occasions while using the Completion API with Structured Outputs, the SDK fails and returns a
ValidationError
:This does not happen every time, but we use it in a production service and this unpredictable behavior is hard to prevent.
To Reproduce
OpenAI.beta.chat.completions.parse(...)
with the following argumentsAfter a few times, this fails with:
Code snippets
No response
OS
debian:bullseye-slim
Python version
CPython 3.10.8
Library version
openai 1.48.0
The text was updated successfully, but these errors were encountered: