ClassAISummaryModel
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:
public class AISummaryModel
Inheritance: objectAISummaryModel
Constructors
AISummaryModel(RadFixedDocument, ISummaryProvider)
Initializes a new instance of the AISummaryModel class.
Declaration
public AISummaryModel(RadFixedDocument document, ISummaryProvider summaryProvider)
Parameters
document
The fixed document to summarize and ask questions about.
summaryProvider
The summary provider to use for AI operations.
Properties
AIAuthor
Gets the author representing the AI assistant.
Messages
Gets the read-only collection of messages in the chat.
Declaration
public IReadOnlyList<ChatTextMessage> Messages { get; }
Property Value
IReadOnlyList<ChatTextMessage>
ShowTypingIndicator
Gets or sets a value indicating whether the typing indicator should be displayed.
SummaryProvider
Gets the summary provider used for generating summaries and answering questions.
Declaration
public ISummaryProvider SummaryProvider { get; }
Property Value
UserAuthor
Gets the author representing the user.
Methods
ClearMessages()
Clears all messages from the conversation.
Declaration
public void ClearMessages()
OnMessageAdded(MessageAddedEventArgs)
Declaration
protected virtual void OnMessageAdded(MessageAddedEventArgs e)
Parameters
e
OnTypingIndicatorChanged()
Declaration
protected virtual void OnTypingIndicatorChanged()
RegenerateResponse(ChatTextMessage)
Regenerates the AI response for a given message.
Declaration
public void RegenerateResponse(ChatTextMessage message)
Parameters
message
The message to regenerate response for.
SendUserMessage(string)
Sends a user message and gets an AI response.
Declaration
public void SendUserMessage(string messageText)
Parameters
messageText
The message text from the user.
Events
MessageAdded
Occurs when a new message is added to the conversation.
Declaration
public event EventHandler<MessageAddedEventArgs> MessageAdded
Event Value
TypingIndicatorChanged
Occurs when the typing indicator state changes.
Declaration
public event EventHandler TypingIndicatorChanged
Event Value