ReducingChatClient Classe

Definição

Um cliente de chat que reduz o tamanho de uma lista de mensagens.

public ref class ReducingChatClient sealed : Microsoft::Extensions::AI::DelegatingChatClient
[System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")]
public sealed class ReducingChatClient : Microsoft.Extensions.AI.DelegatingChatClient
public sealed class ReducingChatClient : Microsoft.Extensions.AI.DelegatingChatClient
[<System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")>]
type ReducingChatClient = class
    inherit DelegatingChatClient
type ReducingChatClient = class
    inherit DelegatingChatClient
Public NotInheritable Class ReducingChatClient
Inherits DelegatingChatClient
Herança
ReducingChatClient
Atributos

Construtores

Name Description
ReducingChatClient(IChatClient, IChatReducer)

Inicializa uma nova instância da ReducingChatClient classe.

Propriedades

Name Description
InnerClient

Obtém o interior IChatClient.

(Herdado de DelegatingChatClient)

Métodos

Name Description
Dispose()

Realiza tarefas definidas pela aplicação associadas à libertação, libertação ou reinício de recursos não geridos.

(Herdado de DelegatingChatClient)
Dispose(Boolean)

Fornece um mecanismo para libertar recursos não geridos.

(Herdado de DelegatingChatClient)
GetResponseAsync(IEnumerable<ChatMessage>, ChatOptions, CancellationToken)

Envia mensagens no chat e responde.

GetService(Type, Object)

Pergunta a IChatClient um objeto do tipo serviceTypeespecificado .

(Herdado de DelegatingChatClient)
GetStreamingResponseAsync(IEnumerable<ChatMessage>, ChatOptions, CancellationToken)

Envia mensagens no chat e transmite a resposta em streaming.

Métodos da Extensão

Name Description
AsBuilder(IChatClient)

Cria um novo ChatClientBuilder uso innerClient como seu cliente interno.

GetRequiredService(IChatClient, Type, Object)

Pede IChatClient um objeto do tipo serviceType especificado e lança uma exceção caso não esteja disponível.

GetRequiredService<TService>(IChatClient, Object)

Pede um IChatClient objeto do tipo TService e lança uma exceção se não estiver disponível.

GetResponseAsync(IChatClient, ChatMessage, ChatOptions, CancellationToken)

Envia uma mensagem por chat e responde às respostas.

GetResponseAsync(IChatClient, String, ChatOptions, CancellationToken)

Envia uma mensagem de texto por chat de utilizador e responde às respostas.

GetResponseAsync<T>(IChatClient, ChatMessage, ChatOptions, Nullable<Boolean>, CancellationToken)

Envia uma mensagem por chat, pedindo uma resposta correspondente ao tipo T.

GetResponseAsync<T>(IChatClient, ChatMessage, JsonSerializerOptions, ChatOptions, Nullable<Boolean>, CancellationToken)

Envia uma mensagem por chat, pedindo uma resposta correspondente ao tipo T.

GetResponseAsync<T>(IChatClient, IEnumerable<ChatMessage>, ChatOptions, Nullable<Boolean>, CancellationToken)

Envia mensagens por chat, pedindo uma resposta correspondente ao tipo T.

GetResponseAsync<T>(IChatClient, IEnumerable<ChatMessage>, JsonSerializerOptions, ChatOptions, Nullable<Boolean>, CancellationToken)

Envia mensagens por chat, pedindo uma resposta correspondente ao tipo T.

GetResponseAsync<T>(IChatClient, String, ChatOptions, Nullable<Boolean>, CancellationToken)

Envia uma mensagem de texto por chat de utilizador, solicitando uma resposta correspondente ao tipo T.

GetResponseAsync<T>(IChatClient, String, JsonSerializerOptions, ChatOptions, Nullable<Boolean>, CancellationToken)

Envia uma mensagem de texto por chat de utilizador, solicitando uma resposta correspondente ao tipo T.

GetService<TService>(IChatClient, Object)

Pede a IChatClient um objeto do tipo TService.

GetStreamingResponseAsync(IChatClient, ChatMessage, ChatOptions, CancellationToken)

Envia uma mensagem por chat e transmite as respostas.

GetStreamingResponseAsync(IChatClient, String, ChatOptions, CancellationToken)

Envia uma mensagem de texto por chat de utilizador e transmite as mensagens de resposta.

Aplica-se a