WithExampleConverter

constructor(delegate: <Error class: unknown class><T>, outputClass: Class<T>, ifPossible: Boolean, generateExamples: Boolean)

Parameters

T

the output type for the converter

delegate

the underlying output converter to which conversion is delegated

outputClass

the class type for which dummy example instances will be generated

ifPossible

determines whether to include both success and failure examples (true) or just a simple example (false)

generateExamples

whether to generate examples or not. This class does nothing if it is false Wraps an existing StructuredOutputConverter with this class to enhance its format description for LLM prompting.