ChatHistoryTruncationReducer(Int32, Nullable<Int32>) Constructor
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.
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.
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'.