Skip to content

openai: add structured outputs support #64

@codefromthecrypt

Description

@codefromthecrypt

Is your feature request related to a problem? Please describe.

The OpenAI platform has an api for completions with structured outputs

https://platform.openai.com/docs/guides/structured-outputs?api-mode=chat

In python, this is used via client.beta.chat.completions

This API is already in use by projects like DeepEval

Describe the solution you'd like

Full support: Logs, metrics and tracing for responses like we do for normal completions

Describe alternatives you've considered

Tell people to not use client.beta.chat.completions

Additional context

Others might have implemented this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions