Table of Contents

Method SummarizeAsync

Namespace
MailFathom.Application.Agent.Answering
Assembly
MailFathom.Application.dll

SummarizeAsync(string?, IReadOnlyList<AgentHistoryTurn>, CancellationToken)

Summarises the turns since the last summary, together with that summary.

Task<string?> SummarizeAsync(string? previousSummary, IReadOnlyList<AgentHistoryTurn> turns, CancellationToken cancellationToken)

Parameters

previousSummary string

The newest summary the conversation already holds, or null where it was never compacted.

turns IReadOnlyList<AgentHistoryTurn>

The turns written since that summary which the new one stands in for, oldest first.

cancellationToken CancellationToken

Cancels the run.

Returns

Task<string>

The summary, or null where no model could produce one — which the caller answers by composing from as much recent history as fits rather than by failing the turn.