JsonStructure
constructor(id: String, schema: LLMParams.Schema.JSON, examples: List<TStruct>, serializer: KSerializer<TStruct>, json: Json, definitionPrompt: (builder: TextContentBuilderBase<*>, structure: JsonStructure<TStruct>) -> TextContentBuilderBase<*> = ::defaultDefinitionPrompt, examplesPrompt: (builder: TextContentBuilderBase<*>, structure: JsonStructure<TStruct>) -> TextContentBuilderBase<*> = StructuredOutputPrompts::examplesPrompt)(source)
Parameters
definitionPrompt
Prompt with definition, explaining the structure to the LLM. Default is JsonStructure.defaultDefinitionPrompt
examplesPrompt
Prompt with examples of valid formats for the structured data. Default is StructuredOutputPrompts.examplesPrompt
Type Parameters
TStruct
The type of data to be structured.