ChatHistorySummarizationReducer 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 ChatHistorySummarizationReducer class.
public ChatHistorySummarizationReducer (Microsoft.SemanticKernel.ChatCompletion.IChatCompletionService service, int targetCount, int? thresholdCount = default);
new Microsoft.SemanticKernel.Agents.History.ChatHistorySummarizationReducer : Microsoft.SemanticKernel.ChatCompletion.IChatCompletionService * int * Nullable<int> -> Microsoft.SemanticKernel.Agents.History.ChatHistorySummarizationReducer
Public Sub New (service As IChatCompletionService, targetCount As Integer, Optional thresholdCount As Nullable(Of Integer) = Nothing)
Parameters
- service
- IChatCompletionService
A IChatCompletionService instance to be used for summarization.
- 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'.