Class
SummarizationProcessor

Generates a concise summary of a document’s text (such as PDF) using full-context prompting up to the configured input token limit.

Definition

Namespace:Telerik.Windows.Documents.AIConnector

Assembly:Telerik.Windows.Documents.AIConnector.dll

Syntax:

cs-api-definition
public sealed class SummarizationProcessor : AIProcessorBase, IDisposable

Inheritance: objectAIProcessorBaseSummarizationProcessor

Implements: IDisposable

Inherited Members AIProcessorBase.Dispose()

Constructors

SummarizationProcessor(IChatClient, SummarizationProcessorSettings)

Initializes a new instance of the SummarizationProcessor class.

Declaration

cs-api-definition
public SummarizationProcessor(IChatClient chatClient, SummarizationProcessorSettings settings)

Parameters

chatClient

IChatClient

The chat client used for communication with the AI service.

settings

SummarizationProcessorSettings

The settings of the processor.

Properties

Settings

Gets the settings that control summarization behavior, including token limits and prompt customization.

Declaration

cs-api-definition
public SummarizationProcessorSettings Settings { get; }

Property Value

SummarizationProcessorSettings

Methods

Summarize(SimpleTextDocument)

Produces a summary of the provided document’s text (such as PDF) using full-context AI prompting, up to the configured input token limit.

Declaration

cs-api-definition
public Task<string> Summarize(SimpleTextDocument document)

Parameters

document

SimpleTextDocument

The document to be summarized.

Returns

Task<string>

A task that represents the asynchronous operation. The task result contains the summarized text.

Exceptions

OperationCanceledException

Thrown when the summarization operation is cancelled.

Events

SummaryResourcesCalculated

Raised when the number of tokens and calls required for summarization have been calculated; provides resource usage details and allows cancellation.

Declaration

cs-api-definition
public event EventHandler<SummaryResourcesCalculatedEventArgs> SummaryResourcesCalculated

Event Value

EventHandler<SummaryResourcesCalculatedEventArgs>