Class AISummaryModel
Simplified model for managing AI-powered summaries and chat messages for a fixed document. Optimized for WinForms usage without complex binding patterns.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI.Converters
Assembly: Telerik.WinControls.PdfViewer.dll
Syntax
public class AISummaryModel
Constructors
AISummaryModel(RadFixedDocument, ISummaryProvider)
Initializes a new instance of the AISummaryModel class.
Declaration
public AISummaryModel(RadFixedDocument document, ISummaryProvider summaryProvider)
Parameters
|
RadFixedDocument
document
The fixed document to summarize and ask questions about. |
|
ISummaryProvider
summaryProvider
The summary provider to use for AI operations. |
Properties
AIAuthor
Gets the author representing the AI assistant.
Declaration
public Author AIAuthor { get; }
Property Value
|
Author
|
Messages
Gets the read-only collection of messages in the chat.
Declaration
public IReadOnlyList<ChatTextMessage> Messages { get; }
Property Value
|
System.Collections.Generic.IReadOnlyList<ChatTextMessage>
|
ShowTypingIndicator
Gets or sets a value indicating whether the typing indicator should be displayed.
Declaration
public bool ShowTypingIndicator { get; set; }
Property Value
|
System.Boolean
|
SummaryProvider
Gets the summary provider used for generating summaries and answering questions.
Declaration
public ISummaryProvider SummaryProvider { get; }
Property Value
|
ISummaryProvider
|
UserAuthor
Gets the author representing the user.
Declaration
public Author UserAuthor { get; }
Property Value
|
Author
|
Methods
ClearMessages()
Clears all messages from the conversation.
Declaration
public void ClearMessages()
OnMessageAdded(MessageAddedEventArgs)
Declaration
protected virtual void OnMessageAdded(MessageAddedEventArgs e)
Parameters
|
MessageAddedEventArgs
e
|
OnTypingIndicatorChanged()
Declaration
protected virtual void OnTypingIndicatorChanged()
RegenerateResponse(ChatTextMessage)
Regenerates the AI response for a given message.
Declaration
public void RegenerateResponse(ChatTextMessage message)
Parameters
|
ChatTextMessage
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
|
System.String
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 Type
|
System.EventHandler<MessageAddedEventArgs>
|
TypingIndicatorChanged
Occurs when the typing indicator state changes.
Declaration
public event EventHandler TypingIndicatorChanged
Event Type
|
System.EventHandler
|