StructuredOutputPrompts
An object that provides utilities for formatting structured output prompts.
Functions
Link copied to clipboard
fun <T> examplesPrompt(builder: TextContentBuilderBase<*>, structure: Structure<T, *>): TextContentBuilderBase<*>
Formats and appends structure examples, if they are present in the provided structure, to the provided text builder, to show an LLM expected output format. If Structure.examples is empty, nothing is appended.
Link copied to clipboard
fun outputInstructionPrompt(builder: TextContentBuilderBase<*>, structure: Structure<*, *>): TextContentBuilderBase<*>
Formats and appends the structured data output to the provided text builder.