Partager via


ChatHistorySummarizationReducer Constructor

Definition

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.

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