Skip to content

Conversation

@LuminaX-alt
Copy link
Owner

…crashes (openai#1763)

This PR adds proper exception handling when parsing responses in beta.chat.completions.parse.

Changes:

Added _parse_response() wrapper to catch pydantic.ValidationError.

Raises a more descriptive ValueError instead of an unhandled Pydantic exception.

  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

Additional context & links

…crashes (openai#1763)

This PR adds proper exception handling when parsing responses in beta.chat.completions.parse.

Changes:

Added _parse_response() wrapper to catch pydantic.ValidationError.

Raises a more descriptive ValueError instead of an unhandled Pydantic exception.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants