Language

ProjectsAgentsModelFactory.VoiceResponse Method

Definition

A persisted voice response representing one model inference turn within a conversation. In list results the output projection may be omitted; retrieve the full response (GET .../responses/{response_id}) or the paged response-items route (GET .../responses/{response_id}/items) for its output items. created_at/completed_at are Foundry durable ordering extensions.

public static Azure.AI.Projects.Agents.VoiceResponse VoiceResponse(Azure.AI.Projects.Agents.VoiceResponseBaseObject? object = default, OpenAI.VoiceResponseBaseStatus? status = default, OpenAI.Realtime.RealtimeResponseStatusDetails statusDetails = default, OpenAI.Realtime.RealtimeResponseUsage usage = default, System.Collections.Generic.IEnumerable<OpenAI.VoiceResponseBaseOutputModality> outputModalities = default, BinaryData maxOutputTokens = default, string id = default, System.Collections.Generic.IEnumerable<OpenAI.Realtime.RealtimeItem> output = default, string conversationId = default, Azure.AI.Projects.Agents.VoiceResponseAudio audio = default, System.Collections.Generic.IDictionary<string,string> metadata = default, float? temperature = default, DateTimeOffset? createdOn = default, DateTimeOffset? completedOn = default);
static member VoiceResponse : Nullable<Azure.AI.Projects.Agents.VoiceResponseBaseObject> * Nullable<OpenAI.VoiceResponseBaseStatus> * OpenAI.Realtime.RealtimeResponseStatusDetails * OpenAI.Realtime.RealtimeResponseUsage * seq<OpenAI.VoiceResponseBaseOutputModality> * BinaryData * string * seq<OpenAI.Realtime.RealtimeItem> * string * Azure.AI.Projects.Agents.VoiceResponseAudio * System.Collections.Generic.IDictionary<string, string> * Nullable<single> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> -> Azure.AI.Projects.Agents.VoiceResponse
Public Shared Function VoiceResponse (Optional object As Nullable(Of VoiceResponseBaseObject) = Nothing, Optional status As Nullable(Of VoiceResponseBaseStatus) = Nothing, Optional statusDetails As RealtimeResponseStatusDetails = Nothing, Optional usage As RealtimeResponseUsage = Nothing, Optional outputModalities As IEnumerable(Of VoiceResponseBaseOutputModality) = Nothing, Optional maxOutputTokens As BinaryData = Nothing, Optional id As String = Nothing, Optional output As IEnumerable(Of RealtimeItem) = Nothing, Optional conversationId As String = Nothing, Optional audio As VoiceResponseAudio = Nothing, Optional metadata As IDictionary(Of String, String) = Nothing, Optional temperature As Nullable(Of Single) = Nothing, Optional createdOn As Nullable(Of DateTimeOffset) = Nothing, Optional completedOn As Nullable(Of DateTimeOffset) = Nothing) As VoiceResponse

Parameters

object
Nullable<VoiceResponseBaseObject>

The object type, must be realtime.response.

status
Nullable<VoiceResponseBaseStatus>

The final status of the response (completed, cancelled, failed, or incomplete, in_progress).

statusDetails
OpenAI.Realtime.RealtimeResponseStatusDetails

Additional details about the status.

usage
OpenAI.Realtime.RealtimeResponseUsage

Usage statistics for the Response, this will correspond to billing. A Realtime 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.

outputModalities
IEnumerable<VoiceResponseBaseOutputModality>

The set of modalities the model used to respond, currently the only possible values are [\"audio\"], [\"text\"]. Audio output always include a text transcript. Setting the output to mode text will disable audio output from the model.

maxOutputTokens
BinaryData

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

id
String

The unique id of the response.

output
IEnumerable<OpenAI.Realtime.RealtimeItem>

The output items produced by the response. May be omitted in list results; retrieve the full response (GET .../responses/{response_id}) or use the paged response-items route (GET .../responses/{response_id}/items) for its output items. Each item's response_id also links it back to this response in the conversation-level items list.

conversationId
String

The id of the conversation this response belongs to.

audio
VoiceResponseAudio

The audio configuration used for the response, including the voice and audio format used for output.

metadata
IDictionary<String,String>

A set of key-value pairs attached to the response.

temperature
Nullable<Single>

The sampling temperature used for the response.

createdOn
Nullable<DateTimeOffset>

The Unix timestamp (in seconds) for when the response was created.

completedOn
Nullable<DateTimeOffset>

The Unix timestamp (in seconds) for when the response completed.

Returns

A new VoiceResponse instance for mocking.

Applies to