語言

OpenAIRealtimeClient 類別

定義

代表 OpenAI 即時 API 的 。IRealtimeClient

public ref class OpenAIRealtimeClient sealed : IDisposable, Microsoft::Extensions::AI::IRealtimeClient
[System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")]
public sealed class OpenAIRealtimeClient : IDisposable, Microsoft.Extensions.AI.IRealtimeClient
public sealed class OpenAIRealtimeClient : IDisposable, Microsoft.Extensions.AI.IRealtimeClient
[<System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")>]
type OpenAIRealtimeClient = class
    interface IRealtimeClient
    interface IDisposable
type OpenAIRealtimeClient = class
    interface IRealtimeClient
    interface IDisposable
Public NotInheritable Class OpenAIRealtimeClient
Implements IDisposable, IRealtimeClient
繼承
OpenAIRealtimeClient
屬性
實作

建構函式

名稱 Description
OpenAIRealtimeClient(RealtimeClient, String)

初始化 OpenAIRealtimeClient 類別的新執行個體。

OpenAIRealtimeClient(String, String)

初始化 OpenAIRealtimeClient 類別的新執行個體。

方法

名稱 Description
CreateSessionAsync(RealtimeSessionOptions, CancellationToken)

建立一個新的即時會話,包含指定的選項。

Dispose()

執行與釋放、釋放或重設非受控資源相關聯的應用程式定義工作。

明確介面實作

名稱 Description
IRealtimeClient.GetService(Type, Object)

請求 給 IRealtimeClient 指定類型的 serviceType物件。

擴充方法

名稱 Description
AsBuilder(IRealtimeClient)

創造一個新的 RealtimeClientBuilder 使用 innerClient ,作為其內在客戶。

GetRequiredService(IRealtimeClient, Type, Object)

會要求 需要 IRealtimeClient 指定類型的 serviceType 物件,若無法使用則拋出例外。

GetRequiredService<TService>(IRealtimeClient, Object)

會請求 一個 IRealtimeClient 類型的 TService 物件,若無法使用則拋出例外。

GetService<TService>(IRealtimeClient, Object)

請求 一個 IRealtimeClient 類型的 TService物件。

適用於