StructuredOutputBuilder

Helpers & Utilities · AiDotNet.PromptEngineering.Templates

Builder for constructing structured output templates fluently.

Constructors

Constructor Summary
StructuredOutputBuilder()

Methods

Method Summary
StructuredOutputBuilder AddField(string name, string type) Adds a field to the schema (for JSON/YAML formats).
StructuredOutputBuilder WithExample(string example) Sets an example of expected output.
StructuredOutputBuilder WithFormat(OutputFormat format) Sets the output format.
StructuredOutputBuilder WithSchema(string schema) Sets the schema definition.
StructuredOutputBuilder WithTask(string task) Sets the task description.
StructuredOutputTemplate Build() Builds the structured output template.