Share via


AgentRunOptions.ResponseFormat Property

Definition

Gets or sets the response format.

public Microsoft.Extensions.AI.ChatResponseFormat? ResponseFormat { get; set; }
member this.ResponseFormat : Microsoft.Extensions.AI.ChatResponseFormat with get, set
Public Property ResponseFormat As ChatResponseFormat

Property Value

Remarks

If null, no response format is specified and the agent will use its default. This property can be set to Text to specify that the response should be unstructured text, to Json to specify that the response should be structured JSON data, or an instance of ChatResponseFormatJson constructed with a specific JSON schema to request that the response be structured JSON data according to that schema. It is up to the agent implementation if or how to honor the request. If the agent implementation doesn't recognize the specific kind of ChatResponseFormat, it can be ignored.

Applies to