New to Telerik UI for WinFormsStart a free 30-day trial

View model for managing AI-powered chat messages for a spreadsheet. Handles the chat loop, message processing, and thread marshaling.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.RadSpreadsheet.dll

Syntax:

C#
public class SpreadsheetAIModel : ViewModelBase, INotifyPropertyChanged, IDisposable

Inheritance: objectViewModelBaseSpreadsheetAIModel

Implements: IDisposableINotifyPropertyChanged

Inherited Members ViewModelBase.VerifyPropertyName(string)ViewModelBase.Dispose()ViewModelBase.OnPropertyChanged(string)ViewModelBase.PropertyChanged

Constructors

Initializes a new instance of the SpreadsheetAIModel class.

C#
public SpreadsheetAIModel(RadSpreadsheet spreadsheet)
Parameters:spreadsheetRadSpreadsheet

The RadSpreadsheet instance to interact with.

Properties

Gets or sets the current author for the next message.

C#
public Author CurrentAuthor { get; set; }

Messages

IReadOnlyList<MessageModel>

Gets the collection of messages in the chat.

C#
public IReadOnlyList<MessageModel> Messages { get; }

Gets or sets the watermark content displayed in the chat input box.

C#
public string NullText { get; set; }

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

C#
public bool ShowTypingIndicator { get; set; }

Methods

Cancels the current prompt request.

C#
public void CancelCurrentRequest()

Releases managed resources.

C#
protected override void Dispose(bool disposing)
Parameters:disposingbool

True to release managed resources.

Overrides: ViewModelBase.Dispose(bool)

Sends a message from the user.

C#
public void SendMessage(string text)
Parameters:textstring

The message text.