Skip to content

Add config method to parse prose output into structured JSON via a lightweight model #1011

Description

@LasmarKhalifa

Follow-up to #1007. Add a config method that runs a small/cheap LLM to coerce a cog's prose prompt into a call to the structured JSON method.

This would allow users to set something like: "Output a Json with the names, followed by the emails" and the lightweight model infers the corresponding schema and wires it into the structured-output method from #1007, so the primary model's response is forced to that shape. No hand-written schema required.

config do
  chat(:extract) do
    generate_schema_with "gpt-4o"
  end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions