Share via


ChatHistoryTruncationReducer(Int32, Nullable<Int32>) Constructor

Definition

Initializes a new instance of the ChatHistoryTruncationReducer class.

public ChatHistoryTruncationReducer (int targetCount, int? thresholdCount = default);
new Microsoft.SemanticKernel.Agents.History.ChatHistoryTruncationReducer : int * Nullable<int> -> Microsoft.SemanticKernel.Agents.History.ChatHistoryTruncationReducer
Public Sub New (targetCount As Integer, Optional thresholdCount As Nullable(Of Integer) = Nothing)

Parameters

targetCount
Int32

The desired number of target messages after reduction.

thresholdCount
Nullable<Int32>

An optional number of messages beyond the 'targetCount' that must be present in order to trigger reduction/

Remarks

While the 'thresholdCount' is optional, it is recommended to provided so that reduction is not triggered for every incremental addition to the chat history beyond the 'targetCount'.

Applies to