Class
AISummaryModel

Simplified model for managing AI-powered summaries and chat messages for a fixed document. Optimized for WinForms usage without complex binding patterns.

Definition

Namespace:Telerik.WinControls.UI.Converters

Assembly:Telerik.WinControls.PdfViewer.dll

Syntax:

cs-api-definition
public class AISummaryModel

Inheritance: objectAISummaryModel

Constructors

AISummaryModel(RadFixedDocument, ISummaryProvider)

Initializes a new instance of the AISummaryModel class.

Declaration

cs-api-definition
public AISummaryModel(RadFixedDocument document, ISummaryProvider summaryProvider)

Parameters

document

RadFixedDocument

The fixed document to summarize and ask questions about.

summaryProvider

ISummaryProvider

The summary provider to use for AI operations.

Properties

AIAuthor

Gets the author representing the AI assistant.

Declaration

cs-api-definition
public Author AIAuthor { get; }

Property Value

Author

Messages

Gets the read-only collection of messages in the chat.

Declaration

cs-api-definition
public IReadOnlyList<ChatTextMessage> Messages { get; }

Property Value

IReadOnlyList<ChatTextMessage>

ShowTypingIndicator

Gets or sets a value indicating whether the typing indicator should be displayed.

Declaration

cs-api-definition
public bool ShowTypingIndicator { get; set; }

Property Value

bool

SummaryProvider

Gets the summary provider used for generating summaries and answering questions.

Declaration

cs-api-definition
public ISummaryProvider SummaryProvider { get; }

Property Value

ISummaryProvider

UserAuthor

Gets the author representing the user.

Declaration

cs-api-definition
public Author UserAuthor { get; }

Property Value

Author

Methods

ClearMessages()

Clears all messages from the conversation.

Declaration

cs-api-definition
public void ClearMessages()

OnMessageAdded(MessageAddedEventArgs)

Declaration

cs-api-definition
protected virtual void OnMessageAdded(MessageAddedEventArgs e)

Parameters

e

MessageAddedEventArgs

OnTypingIndicatorChanged()

Declaration

cs-api-definition
protected virtual void OnTypingIndicatorChanged()

RegenerateResponse(ChatTextMessage)

Regenerates the AI response for a given message.

Declaration

cs-api-definition
public void RegenerateResponse(ChatTextMessage message)

Parameters

message

ChatTextMessage

The message to regenerate response for.

SendUserMessage(string)

Sends a user message and gets an AI response.

Declaration

cs-api-definition
public void SendUserMessage(string messageText)

Parameters

messageText

string

The message text from the user.

Events

MessageAdded

Occurs when a new message is added to the conversation.

Declaration

cs-api-definition
public event EventHandler<MessageAddedEventArgs> MessageAdded

Event Value

EventHandler<MessageAddedEventArgs>

TypingIndicatorChanged

Occurs when the typing indicator state changes.

Declaration

cs-api-definition
public event EventHandler TypingIndicatorChanged

Event Value

EventHandler