Skip to content
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

Fix Structured Output Logic, Add Optional json_object for supporting o1 Models, and Disable Streaming for Pydantic Models #1448

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nikhil-pandey
Copy link
Contributor

  • New supports_json_output Property: Adds a property to models to specify if json_object mode is supported.
  • Improved Fallback Logic for Structured Output: Fixes an issue where fallback logic for structured outputs would return None instead of a valid output.
  • Disables Streaming for Pydantic Response Models: Updates the agent to avoid returning a stream when a response_model (using Pydantic) is specified, as streaming is incompatible with Pydantic models. The UI currently expects streaming, and adjustments will be required to support this change.

@nikhil-pandey nikhil-pandey changed the title Refactor Structured Output Logic, Add Optional json_object for supporting o1 Models, and Disable Streaming for Pydantic Models Fix Structured Output Logic, Add Optional json_object for supporting o1 Models, and Disable Streaming for Pydantic Models Nov 15, 2024
@ashpreetbedi
Copy link
Contributor

thanks @nikhil-pandey, really great PR. Reviewing + testing over the next few days

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