ResponsesStructuredOutputDefinition Class

Definition

A structured output that can be produced by the agent.

public class ResponsesStructuredOutputDefinition : System.ClientModel.Primitives.IJsonModel<Azure.AI.Extensions.OpenAI.ResponsesStructuredOutputDefinition>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Extensions.OpenAI.ResponsesStructuredOutputDefinition>
type ResponsesStructuredOutputDefinition = class
    interface IJsonModel<ResponsesStructuredOutputDefinition>
    interface IPersistableModel<ResponsesStructuredOutputDefinition>
Public Class ResponsesStructuredOutputDefinition
Implements IJsonModel(Of ResponsesStructuredOutputDefinition), IPersistableModel(Of ResponsesStructuredOutputDefinition)
Inheritance
ResponsesStructuredOutputDefinition
Implements

Constructors

Name Description
ResponsesStructuredOutputDefinition(String, String, IDictionary<String,BinaryData>, Nullable<Boolean>)

Initializes a new instance of ResponsesStructuredOutputDefinition.

Properties

Name Description
Description

A description of the output to emit. Used by the model to determine when to emit the output.

Name

The name of the structured output.

Schema

The JSON schema for the structured output.

To assign an object to the value of this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

Examples:

  • BinaryData.FromObjectAsJson("foo"). : Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""). : Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }). : Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"). : Creates a payload of { "key": "value" }.

Strict

Whether to enforce strict validation. Default true.

Methods

Name Description
JsonModelCreateCore(Utf8JsonReader, ModelReaderWriterOptions)
JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
PersistableModelCreateCore(BinaryData, ModelReaderWriterOptions)
PersistableModelWriteCore(ModelReaderWriterOptions)

Explicit Interface Implementations

Name Description
IJsonModel<ResponsesStructuredOutputDefinition>.Create(Utf8JsonReader, ModelReaderWriterOptions)
IJsonModel<ResponsesStructuredOutputDefinition>.Write(Utf8JsonWriter, ModelReaderWriterOptions)
IPersistableModel<ResponsesStructuredOutputDefinition>.Create(BinaryData, ModelReaderWriterOptions)
IPersistableModel<ResponsesStructuredOutputDefinition>.GetFormatFromOptions(ModelReaderWriterOptions)
IPersistableModel<ResponsesStructuredOutputDefinition>.Write(ModelReaderWriterOptions)

Applies to