ProjectsRealtimeSessionClient Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Realtime session client, using bearer token authentication.
public class ProjectsRealtimeSessionClient : OpenAI.Realtime.RealtimeSessionClient
type ProjectsRealtimeSessionClient = class
inherit RealtimeSessionClient
Public Class ProjectsRealtimeSessionClient
Inherits RealtimeSessionClient
- Inheritance
-
OpenAI.Realtime.RealtimeSessionClientProjectsRealtimeSessionClient
Remarks
This type extends OpenAI's OpenAI.Realtime.RealtimeSessionClient so that voice-agent sessions reuse its command and event model (for example OpenAI.Realtime.RealtimeSessionClient.SendInputAudioAsync(System.BinaryData,System.Threading.CancellationToken), OpenAI.Realtime.RealtimeSessionClient.AddItemAsync(OpenAI.Realtime.RealtimeItem,System.String,System.Threading.CancellationToken), or OpenAI.Realtime.RealtimeSessionClient.ReceiveUpdatesAsync(System.Threading.CancellationToken) for OpenAI's strongly-typed OpenAI.Realtime.RealtimeServerUpdate sequence). Only the query string/header values are Foundry-specific here (see the ConnectAsync(String, IDictionary<String,String>, CancellationToken) override below); the WebSocket handshake itself is performed by the base OpenAI.Realtime.RealtimeSessionClient.ConnectAsync(System.String,System.Collections.Generic.IDictionary{System.String,System.String},System.Threading.CancellationToken) implementation, targeting the Foundry voice-agent endpoint (/agents/{agentName}/endpoint/protocols/voice) this instance was constructed with instead of OpenAI's generic /realtime endpoint. Use StartSessionAsync(String, String, RealtimeSessionClientOptions, CancellationToken) (via ProjectsRealtimeClient) to obtain an already-connected instance.
Constructors
| Name | Description |
|---|---|
| ProjectsRealtimeSessionClient() |
Internal empty constructor for mocking. |
Methods
| Name | Description |
|---|---|
| ConnectAsync(String, IDictionary<String,String>, CancellationToken) |
Connects to the Foundry voice-agent endpoint this instance was constructed with. Only the
Foundry-specific query string (api-version, merged with any caller-supplied query string --
see |