Share via


VoiceLiveModelFactory.SessionResponse Method

Definition

The response resource.

public static Azure.AI.VoiceLive.SessionResponse SessionResponse(string id = default, string object = default, Azure.AI.VoiceLive.SessionResponseStatus? status = default, Azure.AI.VoiceLive.ResponseStatusDetails statusDetails = default, System.Collections.Generic.IEnumerable<Azure.AI.VoiceLive.SessionResponseItem> output = default, Azure.AI.VoiceLive.ResponseTokenStatistics usage = default, string conversationId = default, Azure.AI.VoiceLive.VoiceProvider voice = default, System.Collections.Generic.IEnumerable<Azure.AI.VoiceLive.InteractionModality> modalities = default, Azure.AI.VoiceLive.OutputAudioFormat? outputAudioFormat = default, float? temperature = default, Azure.AI.VoiceLive.MaxResponseOutputTokensOption maxOutputTokens = default);
static member SessionResponse : string * string * Nullable<Azure.AI.VoiceLive.SessionResponseStatus> * Azure.AI.VoiceLive.ResponseStatusDetails * seq<Azure.AI.VoiceLive.SessionResponseItem> * Azure.AI.VoiceLive.ResponseTokenStatistics * string * Azure.AI.VoiceLive.VoiceProvider * seq<Azure.AI.VoiceLive.InteractionModality> * Nullable<Azure.AI.VoiceLive.OutputAudioFormat> * Nullable<single> * Azure.AI.VoiceLive.MaxResponseOutputTokensOption -> Azure.AI.VoiceLive.SessionResponse
Public Shared Function SessionResponse (Optional id As String = Nothing, Optional object As String = Nothing, Optional status As Nullable(Of SessionResponseStatus) = Nothing, Optional statusDetails As ResponseStatusDetails = Nothing, Optional output As IEnumerable(Of SessionResponseItem) = Nothing, Optional usage As ResponseTokenStatistics = Nothing, Optional conversationId As String = Nothing, Optional voice As VoiceProvider = Nothing, Optional modalities As IEnumerable(Of InteractionModality) = Nothing, Optional outputAudioFormat As Nullable(Of OutputAudioFormat) = Nothing, Optional temperature As Nullable(Of Single) = Nothing, Optional maxOutputTokens As MaxResponseOutputTokensOption = Nothing) As SessionResponse

Parameters

id
String

The unique ID of the response.

object
String

The object type, must be realtime.response.

status
Nullable<SessionResponseStatus>

The final status of the response.

One of: completed, cancelled, failed, incomplete, or in_progress.

statusDetails
ResponseStatusDetails

Additional details about the status.

output
IEnumerable<SessionResponseItem>

The list of output items generated by the response.

usage
ResponseTokenStatistics

Usage statistics for the Response, this will correspond to billing. A VoiceLive API session will maintain a conversation context and append new Items to the Conversation, thus output from previous turns (text and audio tokens) will become the input for later turns.

conversationId
String

Which conversation the response is added to, determined by the conversation field in the response.create event. If auto, the response will be added to the default conversation and the value of conversation_id will be an id like conv_1234. If none, the response will not be added to any conversation and the value of conversation_id will be null. If responses are being triggered by server VAD, the response will be added to the default conversation, thus the conversation_id will be an id like conv_1234.

voice
VoiceProvider

supported voice identifiers and configurations.

modalities
IEnumerable<InteractionModality>

The set of modalities the model used to respond. If there are multiple modalities, the model will pick one, for example if modalities is ["text", "audio"], the model could be responding in either text or audio.

outputAudioFormat
Nullable<OutputAudioFormat>

The format of output audio. Options are pcm16, g711_ulaw, or g711_alaw.

temperature
Nullable<Single>

Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8.

maxOutputTokens
MaxResponseOutputTokensOption

Maximum number of output tokens for a single assistant response, inclusive of tool calls, that was used in this response.

Returns

A new SessionResponse instance for mocking.

Applies to