We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If I get a BrokenSchemaError, is there any way I can inspect both the prompt that was sent to OpenAI and the raw output we got from the model? Thanks.
The text was updated successfully, but these errors were encountered:
Thank you for your question! Yes, there is a way. The BrokenSchemaError object contains both of them as properties, so here's how you'd extract them:
BrokenSchemaError
try: ... except BrokenSchemaError as error: schema = error.schema openai_response = schema.response # As a JSON object
Similarly, you can extract the raw string response from an InvalidJsonError with error.response.
InvalidJsonError
error.response
Sorry, something went wrong.
No branches or pull requests
If I get a BrokenSchemaError, is there any way I can inspect both the prompt that was sent to OpenAI and the raw output we got from the model? Thanks.
The text was updated successfully, but these errors were encountered: