ToolReducingChatClient 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 applies a tool reduction strategy before invoking the inner client.
public ref class ToolReducingChatClient sealed : Microsoft::Extensions::AI::DelegatingChatClient
[System.Diagnostics.CodeAnalysis.Experimental("MEAI001")]
public sealed class ToolReducingChatClient : Microsoft.Extensions.AI.DelegatingChatClient
public sealed class ToolReducingChatClient : Microsoft.Extensions.AI.DelegatingChatClient
[<System.Diagnostics.CodeAnalysis.Experimental("MEAI001")>]
type ToolReducingChatClient = class
inherit DelegatingChatClient
type ToolReducingChatClient = class
inherit DelegatingChatClient
Public NotInheritable Class ToolReducingChatClient
Inherits DelegatingChatClient
- Inheritance
- Attributes
Remarks
Insert this into a pipeline (typically before function invocation middleware) to automatically reduce the tool list carried on ChatOptions for each request.
Constructors
| Name | Description |
|---|---|
| ToolReducingChatClient(IChatClient, IToolReductionStrategy) |
Initializes a new instance of the ToolReducingChatClient 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. |