ChatHistorySummarizationReducer.ReduceAsync Method
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.
Optionally reduces the chat history.
public System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.SemanticKernel.ChatMessageContent>?> ReduceAsync (System.Collections.Generic.IReadOnlyList<Microsoft.SemanticKernel.ChatMessageContent> history, System.Threading.CancellationToken cancellationToken = default);
abstract member ReduceAsync : System.Collections.Generic.IReadOnlyList<Microsoft.SemanticKernel.ChatMessageContent> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<seq<Microsoft.SemanticKernel.ChatMessageContent>>
override this.ReduceAsync : System.Collections.Generic.IReadOnlyList<Microsoft.SemanticKernel.ChatMessageContent> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<seq<Microsoft.SemanticKernel.ChatMessageContent>>
Public Function ReduceAsync (history As IReadOnlyList(Of ChatMessageContent), Optional cancellationToken As CancellationToken = Nothing) As Task(Of IEnumerable(Of ChatMessageContent))
Parameters
- history
- IReadOnlyList<ChatMessageContent>
The source history (which may have been previously reduced)
- cancellationToken
- CancellationToken
The CancellationToken to monitor for cancellation requests. The default is None.
Returns
The reduced history, or 'null' if no reduction has occurred