Skip to content

Enable non-strict output types #539

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

Merged
merged 1 commit into from
Apr 21, 2025
Merged

Enable non-strict output types #539

merged 1 commit into from
Apr 21, 2025

Conversation

rm-openai
Copy link
Collaborator

@rm-openai rm-openai commented Apr 17, 2025

See #528, some folks are having issues because their output types are not strict-compatible.

My approach was:

  1. Create AgentOutputSchemaBase, which represents the base methods for an output type - the json schema + validation
  2. Make the existing AgentOutputSchema subclass AgentOutputSchemaBase
  3. Allow users to pass a AgentOutputSchemaBase to Agent(output_type=...)

@rm-openai rm-openai merged commit e3698f3 into main Apr 21, 2025
10 checks passed
@rm-openai rm-openai deleted the rm/pr539 branch April 21, 2025 15:58
hankun11 pushed a commit to hankun11/openai-agents-python that referenced this pull request Apr 23, 2025
* upstream/main:
  Examples: Fix financial_research_agent instructions (openai#573)
  Adding extra_headers parameters to ModelSettings (openai#550)
  v0.0.12 (openai#564)
  Pass through organization/project headers to tracing backend, fix speech_group enum (openai#562)
  Docs and tests for litellm (openai#561)
  RFC: automatically use litellm if possible (openai#534)
  Fix visualize graph filename to without extension. (openai#554)
  Start and finish streaming trace in impl metod (openai#540)
  Enable non-strict output types (openai#539)
  Examples for image inputs (openai#553)
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