ResponseCreatedRealtimeServerMessage Class

Definition

Represents a real-time message for creating a response item.

public ref class ResponseCreatedRealtimeServerMessage : Microsoft::Extensions::AI::RealtimeServerMessage
[System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")]
public class ResponseCreatedRealtimeServerMessage : Microsoft.Extensions.AI.RealtimeServerMessage
public class ResponseCreatedRealtimeServerMessage : Microsoft.Extensions.AI.RealtimeServerMessage
[<System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")>]
type ResponseCreatedRealtimeServerMessage = class
    inherit RealtimeServerMessage
type ResponseCreatedRealtimeServerMessage = class
    inherit RealtimeServerMessage
Public Class ResponseCreatedRealtimeServerMessage
Inherits RealtimeServerMessage
Inheritance
ResponseCreatedRealtimeServerMessage
Attributes

Remarks

Used with the ResponseDone and ResponseCreated messages.

Provider implementations should emit this message with ResponseCreated when the model begins generating a new response, and with ResponseDone when the response is complete. The built-in OpenTelemetryRealtimeClientSession middleware depends on these messages for tracing response lifecycle.

Providers that do not natively support response lifecycle events (e.g., those that only stream content parts and signal turn completion) should synthesize these messages to ensure correct middleware behavior. In such cases, ResponseId may be set to a synthetic value or left null.

Constructors

Name Description
ResponseCreatedRealtimeServerMessage(RealtimeServerMessageType)

Initializes a new instance of the ResponseCreatedRealtimeServerMessage class.

Properties

Name Description
AdditionalProperties

Gets or sets any additional properties associated with the response.

Error

Gets or sets the error content of the response, if any.

Items

Gets or sets the list of the conversation items included in the response.

MaxOutputTokens

Gets or sets the maximum number of output tokens for the response, inclusive of all modalities and tool calls.

MessageId

Gets or sets the optional message ID associated with the response. This can be used for tracking and correlation purposes.

(Inherited from RealtimeServerMessage)
OutputAudioOptions

Gets or sets the output audio options for the response. If null, the default conversation audio options will be used.

OutputModalities

Gets or sets the output modalities for the response. like "text", "audio". If null, then default conversation modalities will be used.

OutputVoice

Gets or sets the voice of the output audio.

RawRepresentation

Gets or sets the raw representation of the response. This can be used to hold the original data structure received from the model.

(Inherited from RealtimeServerMessage)
ResponseId

Gets or sets the unique response ID.

Status

Gets or sets the status of the response.

Type

Gets or sets the type of the real-time response.

(Inherited from RealtimeServerMessage)
Usage

Gets or sets the per-response token usage for billing purposes.

Applies to