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

Add support for structured output with OpenAI #807

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dmontagu
Copy link
Contributor

This would make it possible to specify whether to use the structured output approach by way of model_settings.

Another option would be to always use it when there are no non-result-tools present. (The implementation of that could look similar to this.) Not sure if there are advantages/disadvantages to that.

Note this would work to provide a way to force the result type and no tool calls for a specific run but not necessarily all runs, by just overriding model settings.

@dmontagu dmontagu marked this pull request as draft January 29, 2025 17:34
Copy link

cloudflare-workers-and-pages bot commented Jan 29, 2025

Deploying pydantic-ai with  Cloudflare Pages  Cloudflare Pages

Latest commit: 16b3087
Status:🚫  Build failed.

View logs

@dmontagu dmontagu force-pushed the dmontagu/remove-agentmodel branch from 3d74599 to 2648220 Compare January 29, 2025 18:48
Base automatically changed from dmontagu/remove-agentmodel to main February 5, 2025 20:15
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.

1 participant