AIPromptEventBuilder
Defines the fluent API for configuring the Kendo AIPrompt for ASP.NET MVC events.
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class AIPromptEventBuilder : EventBuilder
Inheritance: objectEventBuilderAIPromptEventBuilder
Inherited Members
Constructors
Initializes a new instance of the AIPrompt class.
public AIPromptEventBuilder(IDictionary<string, object> events)
The client events.
Methods
Defines the handler of the CommandExecute client-side event. Triggered when a command item from the Commands view is clicked. The panel bar dataItem of the selected item is available through the event argument.
public AIPromptEventBuilder CommandExecute(string handler)
The name of the JavaScript function that will handle the CommandExecute event.
Returns:Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the AIPrompt is focused.The event handler function context (available via the this keyword) will be set to the widget instance.
public AIPromptEventBuilder KendoKeydown(string handler)
The name of the JavaScript function that will handle the KendoKeydown event.
Returns:Defines the handler of the OutputAction client-side event. Triggered when an action button on an output card is clicked. This event is fired for both built-in and custom actions.
public AIPromptEventBuilder OutputAction(string handler)
The name of the JavaScript function that will handle the OutputAction event.
Returns:Defines the handler of the OutputCopy client-side event. This event is deprecated. Use the outputAction event instead.Triggered when the copy output button of an output is clicked. The prompt and the output object are available through the event argument.
[Obsolete("This option is obsolete since Q3 2025 and will be removed in future releases")]
public AIPromptEventBuilder OutputCopy(string handler)
The name of the JavaScript function that will handle the OutputCopy event.
Returns:Defines the handler of the OutputRatingChange client-side event. This event is deprecated. Use the outputAction event instead.Triggered when the rating of an output is changed through the rate buttons of an output. The output id and the new rating are available through the event argument.
[Obsolete("This option is obsolete since Q3 2025 and will be removed in future releases")]
public AIPromptEventBuilder OutputRatingChange(string handler)
The name of the JavaScript function that will handle the OutputRatingChange event.
Returns:Defines the handler of the PromptRequest client-side event. Triggered when the prompt view Generate output button is clicked. The prompt text is available through the event argument. Suitable to make a request to the AI service to receive an output. Use the addPromptOutput method to add the generated output to the promptOutputs collection.The prompt, output, history and isRetry properties are available in the event argument. When the output is generated after clicking the retry button of an output, the isRetry property is true and the output property is the output content of the output card. The history property is an array of prompt outputs generated before the current output.You can prevent the default behavior of the promptRequest event by calling e.preventDefault() in the event handler.
public AIPromptEventBuilder PromptRequest(string handler)
The name of the JavaScript function that will handle the PromptRequest event.
Returns:Defines the handler of the PromptRequestCancel client-side event. Triggered when a prompt request is cancelled, typically by clicking the stop generation button during streaming operations.
public AIPromptEventBuilder PromptRequestCancel(string handler)
The name of the JavaScript function that will handle the PromptRequestCancel event.
Returns:Defines the handler of the PromptResponse client-side event. Triggered when the AI service response is received. The response data is available through the event argument. Triggered only when the serviceUrl option is set.You can prevent the default behavior of the promptResponse event by calling e.preventDefault() in the event handler.
public AIPromptEventBuilder PromptResponse(string handler)
The name of the JavaScript function that will handle the PromptResponse event.
Returns: