ImageGeneratingChatClient Class
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.
A delegating chat client that enables image generation capabilities by converting HostedImageGenerationTool instances to function tools.
public ref class ImageGeneratingChatClient sealed : Microsoft::Extensions::AI::DelegatingChatClient
[System.Diagnostics.CodeAnalysis.Experimental("MEAI001")]
public sealed class ImageGeneratingChatClient : Microsoft.Extensions.AI.DelegatingChatClient
public sealed class ImageGeneratingChatClient : Microsoft.Extensions.AI.DelegatingChatClient
[<System.Diagnostics.CodeAnalysis.Experimental("MEAI001")>]
type ImageGeneratingChatClient = class
inherit DelegatingChatClient
type ImageGeneratingChatClient = class
inherit DelegatingChatClient
Public NotInheritable Class ImageGeneratingChatClient
Inherits DelegatingChatClient
- Inheritance
- Attributes
Remarks
The provided implementation of IChatClient is thread-safe for concurrent use so long as the IImageGenerator employed is also thread-safe for concurrent use.
This client automatically detects HostedImageGenerationTool instances in the Tools collection and replaces them with equivalent function tools that the chat client can invoke to perform image generation and editing operations.
Constructors
| Name | Description |
|---|---|
| ImageGeneratingChatClient(IChatClient, IImageGenerator, ImageGeneratingChatClient+DataContentHandling) |
Initializes a new instance of the ImageGeneratingChatClient class. |
Properties
| Name | Description |
|---|---|
| InnerClient |
Gets the inner IChatClient. (Inherited from DelegatingChatClient) |
Methods
| Name | Description |
|---|---|
| Dispose() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from DelegatingChatClient) |
| Dispose(Boolean) |
Provides a mechanism for releasing unmanaged resources. (Inherited from DelegatingChatClient) |
| GetResponseAsync(IEnumerable<ChatMessage>, ChatOptions, CancellationToken) |
Sends chat messages and returns the response. |
| GetService(Type, Object) |
Asks the IChatClient for an object of the specified type |
| GetStreamingResponseAsync(IEnumerable<ChatMessage>, ChatOptions, CancellationToken) |
Sends chat messages and streams the response. |