New to Kendo UI for Vue? Start a free 30-day trial

Kendo UI for Vue AIPrompt Events

This article provides details about the different events available in the AIPrompt API. Using these events you can tailor the AIPrompt's behavior to your specific requirements.

List of available AIPrompt events

  • onActiveviewchange - Fires when active view is changed. Exposes the name of the new active view as event data.
  • onCommandexecute - Fires each time the user clicks a command in the Command view. Exposes the selected command as event data.
  • onPromptrequest - Fires when user clicks the Generate button in the Prompt view.

AIPromptOutputView events

In addition to the events available in the AIPrompt component, the AIPromptOutputView implements the following events helping you handle different scenarios:

  • onCopy - Fires each time the user clicks Copy button in the card.
  • onRating - Fires each time the user clicks a rating button in the card.
  • onRetry - Fires each time the user clicks Retry button in the card.

AIPrompt events demo

The following example demonstrates the AIPrompt events.

Example
View Source
Change Theme: