Expand description
Structured object generation from LLM output.
Provides reliable JSON object generation with schema validation, automatic repair, and streaming partial object support. Works across all providers by selecting the best available mode (strict JSON schema, json_mode, tool-call, or prompt-only).
Structs§
- Structured
Request - Request specification for structured object generation.
- Structured
Result - Result of a successful structured generation.
Enums§
- Structured
Mode - Mode selection for structured output generation.
Functions§
- extract_
json_ value - Extract a JSON value from potentially dirty LLM output.
- generate_
blocking - Generate a structured JSON object using the given LLM client.
- generate_
streaming - Generate a structured JSON object with streaming partial updates.
Type Aliases§
- Partial
Object Callback - Callback for streaming partial object snapshots.