Skip to content

Structured JSON output with Pydantic integration #1565

Open
@cebtenzzre

Description

@cebtenzzre

Feature request

We could leverage the grammar-based sampling work introduced in ggml-org/llama.cpp#1773 to provide reliable JSON output via the python bindings.

Motivation

This would make the python bindings much more useful as a tool that can be used in a predictable manner for all kinds of tasks.

Your contribution

I intend to submit a PR implementing this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions