OpenAIRealtimeClientSession Classe
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Representa uma IRealtimeClientSession para a API OpenAI Realtime sobre WebSocket.
public ref class OpenAIRealtimeClientSession sealed : IAsyncDisposable, Microsoft::Extensions::AI::IRealtimeClientSession
[System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")]
public sealed class OpenAIRealtimeClientSession : IAsyncDisposable, Microsoft.Extensions.AI.IRealtimeClientSession
public sealed class OpenAIRealtimeClientSession : IAsyncDisposable, Microsoft.Extensions.AI.IRealtimeClientSession
[<System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")>]
type OpenAIRealtimeClientSession = class
interface IRealtimeClientSession
interface IAsyncDisposable
type OpenAIRealtimeClientSession = class
interface IRealtimeClientSession
interface IAsyncDisposable
Public NotInheritable Class OpenAIRealtimeClientSession
Implements IAsyncDisposable, IRealtimeClientSession
- Herança
-
OpenAIRealtimeClientSession
- Atributos
- Implementações
Construtores
| Name | Descrição |
|---|---|
| OpenAIRealtimeClientSession(String, String) |
Inicializa uma nova instância da OpenAIRealtimeClientSession classe. |
Propriedades
| Name | Descrição |
|---|---|
| Options |
Obtém as opções atuais da sessão. |
Métodos
| Name | Descrição |
|---|---|
| ConnectAsync(CancellationToken) |
Liga o WebSocket à API em tempo real da OpenAI. |
| DisposeAsync() |
Realiza tarefas definidas pela aplicação associadas à libertação, libertação ou reinício de recursos não geridos de forma assíncrona. |
| GetStreamingResponseAsync(CancellationToken) |
Transmite a resposta da sessão em tempo real. |
| SendAsync(RealtimeClientMessage, CancellationToken) |
Envia uma mensagem de cliente para a sessão. |
Implementações de Interface Explícita
| Name | Descrição |
|---|---|
| IRealtimeClientSession.GetService(Type, Object) |
Pergunta a IRealtimeClientSession um objeto do tipo |
Métodos da Extensão
| Name | Descrição |
|---|---|
| ConfigureAwait(IAsyncDisposable, Boolean) |
Configura como aguarda nas tarefas devolvidas de um descartável assíncrono será realizada. |
| GetRequiredService(IRealtimeClientSession, Type, Object) |
Pede IRealtimeClientSession um objeto do tipo |
| GetRequiredService<TService>(IRealtimeClientSession, Object) |
Pede um IRealtimeClientSession objeto do tipo |
| GetService<TService>(IRealtimeClientSession, Object) |
Pede a IRealtimeClientSession um objeto do tipo |