AgentResponseFormat
AgentPrism.Abstractions.dllThe definition of a structured output.
public sealed record AgentResponseFormat : IEquatable<AgentResponseFormat>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”IEquatable<AgentResponseFormat>
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”When ModelBinding.ResponseFormat is null today’s behaviour does not change and no format constraint is sent to the provider. This type takes effect only when the user asks for a format explicitly.
Validation happens while the agent is built (AgentDefinitionCompiler):
AgentResponseFormat.Schema cannot be empty while AgentResponseFormat.Kind is
AgentResponseFormatKind.JsonSchema, and it cannot be populated in the
other modes. AgentResponseFormat.Schema must be a JSON object; its content
is not validated.
Constructors
Section titled “Constructors”AgentResponseFormat()
Section titled “ AgentResponseFormat()”public AgentResponseFormat()Properties
Section titled “Properties”Gets the requested format.
public required AgentResponseFormatKind Kind { get; init; }Property Value
Section titled “Property Value”Schema
Section titled “ Schema”Gets the JSON schema. It is populated only for AgentResponseFormatKind.JsonSchema and must be a JSON object.
public JsonElement? Schema { get; init; }Property Value
Section titled “Property Value”SchemaDescription
Section titled “ SchemaDescription”Gets the description of the schema.
public string? SchemaDescription { get; init; }Property Value
Section titled “Property Value”SchemaName
Section titled “ SchemaName”Gets the name of the schema. The provider can pass it on to the model.
public string? SchemaName { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Equals(object?)
Section titled “ Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object?
Returns
Section titled “Returns”Equals(AgentResponseFormat?)
Section titled “ Equals(AgentResponseFormat?)”public bool Equals(AgentResponseFormat? other)Parameters
Section titled “Parameters”other AgentResponseFormat?
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Operators
Section titled “Operators”operator ==(AgentResponseFormat?, AgentResponseFormat?)
Section titled “ operator ==(AgentResponseFormat?, AgentResponseFormat?)”public static bool operator ==(AgentResponseFormat? left, AgentResponseFormat? right)Parameters
Section titled “Parameters”left AgentResponseFormat?
right AgentResponseFormat?
Returns
Section titled “Returns”operator !=(AgentResponseFormat?, AgentResponseFormat?)
Section titled “ operator !=(AgentResponseFormat?, AgentResponseFormat?)”public static bool operator !=(AgentResponseFormat? left, AgentResponseFormat? right)Parameters
Section titled “Parameters”left AgentResponseFormat?
right AgentResponseFormat?