StructuredRequestConfig
Configures structured output behavior. Defines which structures in which modes should be used for each provider when requesting a structured output.
Constructors
Properties
A map matching LLMProvider to compatible StructuredRequest definitions. Each provider may require different schema formats. E.g. for JsonStructure this means you have to use the appropriate JsonSchemaGenerator implementation for each provider for StructuredRequest.Native, or fallback to StructuredRequest.Manual
Fallback StructuredRequest to be used when there's no suitable structure found in byProvider for a requested LLMProvider. Defaults to null, meaning structured output would fail with error in such a case.
Optional parser that handles malformed responses by using an auxiliary LLM to intelligently fix parsing errors. When specified, parsing errors trigger additional LLM calls with error context to attempt correction of the structure format.