Skip to content

Add OpenAI Response type JSON schema #237

@ledongthuc

Description

@ledongthuc

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

I'm currently using Lingoose with OpenAI, and one of my project requirements involves defining response types using JSON Schema, as described in OpenAI’s structured outputs guide.

At the moment, Lingoose does not seem to support defining JSON Schema for structured outputs.

Describe the solution you'd like

I’d love to see support for JSON Schema added to Lingoose. Specifically, adding a new field to hold the JSON Schema and applying it when the response format type is defined for OpenAI would solve this need.

Describe alternatives you've considered

One workaround I’ve considered is defining the JSON Schema separately and manually converting it to OpenAI’s expected schema format. However, this still introduces a dependency on OpenAI’s schema structure, and adds unnecessary complexity to the library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions