# 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](https://www.telerik.com/kendo-vue-ui-develop/components/conversationalui/api/aipromptprops#onactiveviewchange) - Fires when active view is changed. Exposes the name of the new active view as event data.
* [onCommandexecute](https://www.telerik.com/kendo-vue-ui-develop/components/conversationalui/api/aipromptprops#oncommandexecute) - Fires each time the user clicks a command in the Command view. Exposes the selected command as event data.
* [onPromptrequest](https://www.telerik.com/kendo-vue-ui-develop/components/conversationalui/api/aipromptprops#onpromptrequest) - Fires when user clicks the `Generate` button in the Prompt view.
* [onCancel](https://www.telerik.com/kendo-vue-ui-develop/components/conversationalui/api/aipromptprops#oncancel) - Fires when user cancels an ongoing operation, such as streaming responses or loading states.

### AIPromptOutputView events

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

* [onCopy](https://www.telerik.com/kendo-vue-ui-develop/components/conversationalui/api/aipromptoutputviewprops#oncopy) - Fires each time the user clicks `Copy` button in the card.
* [onRating](https://www.telerik.com/kendo-vue-ui-develop/components/conversationalui/api/aipromptoutputviewprops#onrating) - Fires each time the user clicks a rating button in the card.
* [onRetry](https://www.telerik.com/kendo-vue-ui-develop/components/conversationalui/api/aipromptoutputviewprops#onretry) - Fires each time the user clicks `Retry` button in the card.

## AIPrompt events demo

The following example demonstrates the AIPrompt events.

[Demo Source](https://demos.telerik.com/kendo-vue-ui/conversational-ui/ai-prompt/events/source.txt)

## Suggested Links

* [API Reference of the AIPrompt](https://www.telerik.com/kendo-vue-ui-develop/components/conversationalui/api/aipromptprops)
