OpenAIRealtimeClientSession.ConnectAsync(CancellationToken) Method
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.
Connects the WebSocket to the OpenAI Realtime API.
public System.Threading.Tasks.Task ConnectAsync(System.Threading.CancellationToken cancellationToken = default);
member this.ConnectAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function ConnectAsync (Optional cancellationToken As CancellationToken = Nothing) As Task
Parameters
- cancellationToken
- CancellationToken
The CancellationToken to monitor for cancellation requests.
Returns
A task representing the asynchronous connect operation.
Exceptions
The session was not created with an owned realtime client.