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

LLM structured output support (client.beta.chat.completions.parse) #855

Open
thedotedge opened this issue Feb 11, 2025 · 0 comments
Open

Comments

@thedotedge
Copy link

Description

Hi,
Structured output in https://platform.openai.com/docs/guides/structured-outputs has a different response format and is using a different method, which https://logfire.pydantic.dev/docs/integrations/llms/openai/#methods-covered does not seem to be supporting currently.

completion = client.beta.chat.completions.parse(
    model="gpt-4o-2024-08-06",
    messages=[
        {"role": "system", "content": "Extract the event information."},
        {"role": "user", "content": "Alice and Bob are going to a science fair on Friday."},
    ],
    response_format=CalendarEvent,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant