# InlineAIPrompt Events

This article describes the events of the Telerik InlineAIPrompt for Blazor:

* [`OnOutputActionClick`](https://www.telerik.com/blazor-ui/documentation/components/inlineaiprompt/events#onoutputactionclick)
* [`OnPromptRequest`](https://www.telerik.com/blazor-ui/documentation/components/inlineaiprompt/events#onpromptrequest)
* [`OnPromptRequestStop`](https://www.telerik.com/blazor-ui/documentation/components/inlineaiprompt/events#onpromptrequeststop)
* [`OnCommandExecute`](https://www.telerik.com/blazor-ui/documentation/components/inlineaiprompt/events#oncommandexecute)
* [`PromptChanged`](https://www.telerik.com/blazor-ui/documentation/components/inlineaiprompt/events#promptchanged)

## OnOutputActionClick

The `OnOutputActionClick` event fires when the user clicks an output action button in the output view of the InlineAIPrompt component. Use this event to handle custom actions such as copying, retrying, or providing feedback on the generated output.

To define the available output actions, set the `OutputActions` parameter to a list of [`InlineAIPromptOutputActionDescriptor`](https://www.telerik.com/blazor-ui/documentation/api/telerik.blazor.components.inlineaipromptoutputactiondescriptor) objects. Each action descriptor configures the appearance and behavior of an action button.

The event handler receives an argument of type [`InlineAIPromptOutputActionClickEventArgs` API reference](https://www.telerik.com/blazor-ui/documentation/api/telerik.blazor.components.inlineaipromptoutputactionclickeventargs), which provides details about the clicked action, the prompt, the output, and the related command (if any).

## OnPromptRequest

The `OnPromptRequest` event fires when the user clicks on the **Generate** button within the Prompt view or retries a prompt from the Output view.

The event handler receives an argument of type [`InlineAIPromptPromptRequestEventArgs` API reference](https://www.telerik.com/blazor-ui/documentation/api/telerik.blazor.components.inlineaipromptpromptrequesteventargs). See the [example below](https://www.telerik.com/blazor-ui/documentation/components/inlineaiprompt/events#example).

> Do not use the `OnPromptRequest` event when [integrating the InlineAIPrompt component with `Microsoft.Extensions.AI`](https://www.telerik.com/blazor-ui/documentation/common-features/microsoft-extensions-ai-integration). The `OnPromptRequest` event disables such integration.

## OnPromptRequestStop

The `OnPromptRequestStop` event fires when the user stops a prompt request by clicking the stop floating action button in the output view. This event allows you to handle the cancellation of an ongoing prompt request.

The event handler receives no arguments.

## OnCommandExecute

The `OnCommandExecute` event fires when the user clicks on a command within the Commands view.

The event handler receives an argument of type [`InlineAIPromptCommandExecuteEventArgs` API reference](https://www.telerik.com/blazor-ui/documentation/api/telerik.blazor.components.inlineaipromptcommandexecuteeventargs). See the [example below](https://www.telerik.com/blazor-ui/documentation/components/inlineaiprompt/events#example).

## PromptChanged

The `PromptChanged` event fires when the user changes the prompt text. Use the event to update the InlineAIPrompt's prompt when the `Prompt` parameter is set with one-way binding, otherwise, the user action will be ignored.

## Example

> caption Using InlineAIPrompt events

<demo metaUrl="client/inlineaiprompt/events/example-1/" height="370"></demo>
