Skip to content

Feature Request: Support JSON Format Output for Pydantic Objects #125

@42elenz

Description

@42elenz

Hi 👋,

It would be great if your library/tool could support native handling of Pydantic models for generating JSON outputs, for the json mode of some models.

Use Case:
I'm working with Pydantic objects and need to put them into the insturction-JSON .
Thanks for considering!

example:
models = [
("openai", "gpt-4.1", {"n":1, "temperature":0, "max_tokens":max_tokens, "text_format": list[Receips]}),
("gemini", "gemini-1.5-flash", {"candidate_count": 1, "temperature": 0, "response_mime_type": "application/json", "response_schema": list[Receips]})
]

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