SmartPasteButton Events
This article describes the events available in the Telerik SmartPasteButton for Blazor:
OnRequestStart
The OnRequestStart event fires before sending the Smart Paste request to the AI service. This event allows you to inspect and modify the content and form fields that will be processed by AI.
The event handler receives an argument of type SmartPasteButtonRequestStartEventArgs.
Handle the OnRequestStart event to customize AI processing
OnRequestStop
The OnRequestStop event fires when the IChatClient is enabled and the stop state of the button is triggered. This event is only fired when EnableChatClient is set to true.
This event allows you to handle scenarios where the AI processing needs to be interrupted or when the user cancels the operation.
Handle the OnRequestStop event to customize AI processing
<TelerikSmartPasteButton ChatClientKey="gpt-4o-mini"
OnRequestStop="@HandleRequestStop" />
@code {
private async Task HandleRequestStop()
{
//handle the event when the user clicks the stop button
}
}