ImageGeneratingChatClient Classe

Definição

Um cliente de chat de delegação que permite capacidades de geração de imagens ao converter HostedImageGenerationTool instâncias em ferramentas funcionais.

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

Observações

A implementação fornecida de IChatClient é segura para threads para uso concorrente, desde que a IImageGenerator utilizada também seja thread-safe para uso concorrente.

Este cliente deteta HostedImageGenerationTool automaticamente as instâncias na Tools coleção e substitui-as por ferramentas funcionais equivalentes que o cliente de chat pode invocar para realizar operações de geração e edição de imagens.

Construtores

Name Description
ImageGeneratingChatClient(IChatClient, IImageGenerator, ImageGeneratingChatClient+DataContentHandling)

Inicializa uma nova instância da ImageGeneratingChatClient 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