Share via


IToolReductionStrategy Interface

Definition

Represents a strategy capable of selecting a reduced set of tools for a chat request.

public interface class IToolReductionStrategy
[System.Diagnostics.CodeAnalysis.Experimental("MEAI001")]
public interface IToolReductionStrategy
public interface IToolReductionStrategy
[<System.Diagnostics.CodeAnalysis.Experimental("MEAI001")>]
type IToolReductionStrategy = interface
type IToolReductionStrategy = interface
Public Interface IToolReductionStrategy
Derived
Attributes

Remarks

A tool reduction strategy is invoked prior to sending a request to an underlying IChatClient, enabling scenarios where a large tool catalog must be trimmed to fit provider limits or to improve model tool selection quality.

The implementation should return a non-null enumerable. Returning the original Tools instance indicates no change. Returning a different enumerable indicates the caller may replace the existing tool list.

Methods

Name Description
SelectToolsForRequestAsync(IEnumerable<ChatMessage>, ChatOptions, CancellationToken)

Selects the tools that should be included for a specific request.

Applies to