You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/inlineaiprompt/events.md
+15-34Lines changed: 15 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ position: 10
10
10
11
11
# InlineAIPrompt Events
12
12
13
-
This article explains the events available in the Telerik InlineAIPrompt for Blazor:
13
+
This article describes the events of the Telerik InlineAIPrompt for Blazor:
14
14
15
15
*[`OnOutputActionClick`](#onoutputactionclick)
16
16
*[`OnPromptRequest`](#onpromptrequest)
@@ -20,49 +20,31 @@ This article explains the events available in the Telerik InlineAIPrompt for Bla
20
20
21
21
## OnOutputActionClick
22
22
23
-
The `OnOutputActionClick` event fires when the user clicks an output action button in the output view of the AIPrompt component. Use this event to handle custom actions such as copying, retrying, or providing feedback on the generated output.
23
+
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.
24
24
25
25
To define the available output actions, set the `OutputActions` parameter to a list of [`InlineAIPromptOutputActionDescriptor`](slug:Telerik.Blazor.Components.InlineAIPromptOutputActionDescriptor) objects. Each action descriptor configures the appearance and behavior of an action button.
26
26
27
-
The event handler receives an argument of type `InlineAIPromptOutputActionClickEventArgs`, which provides details about the clicked action, the prompt, the output, and the related command (if any). For a full list of available properties, refer to the [`InlineAIPromptOutputActionClickEventArgs` API reference](slug:Telerik.Blazor.Components.InlineAIPromptOutputActionClickEventArgs).
27
+
The event handler receives an argument of type [`InlineAIPromptOutputActionClickEventArgs` API reference](slug:Telerik.Blazor.Components.InlineAIPromptOutputActionClickEventArgs), which provides details about the clicked action, the prompt, the output, and the related command (if any).
28
28
29
29
## OnPromptRequest
30
30
31
31
The `OnPromptRequest` event fires when the user clicks on the **Generate** button within the Prompt view or retries a prompt from the Output view.
32
32
33
-
The event handler receives an argument of type [`InlineAIPromptPromptRequestEventArgs`](slug:Telerik.Blazor.Components.InlineAIPromptPromptRequestEventArgs). See the [example below](#example).
|`Prompt`|`string`| The prompt text of the request. |
40
-
|`Output`|`string`| The output of the request. The output is based on the prompt text. |
41
-
|`IsCancelled`|`bool`| Whether the event is cancelled and the built-in action is prevented. |
42
-
|`OutputItem`|`InlineAIPromptOutputItemDescriptor`| The output item. This property will be populated only when the user retries an existing output. See [`InlineAIPromptOutputItemDescriptor`](slug:Telerik.Blazor.Components.InlineAIPromptOutputItemDescriptor). |
33
+
The event handler receives an argument of type [`InlineAIPromptPromptRequestEventArgs` API reference](slug:Telerik.Blazor.Components.InlineAIPromptPromptRequestEventArgs). See the [example below](#example).
43
34
44
35
> Do not use the `OnPromptRequest` event when [integrating the InlineAIPrompt component with `Microsoft.Extensions.AI`](slug:common-features-microsoft-extensions-ai-integration). The `OnPromptRequest` event disables such integration.
45
36
46
37
## OnPromptRequestStop
47
38
48
39
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.
49
40
50
-
The event handler receives an `EventCallback` with no arguments.
41
+
The event handler receives no arguments.
51
42
52
43
## OnCommandExecute
53
44
54
45
The `OnCommandExecute` event fires when the user clicks on a command within the Commands view.
55
46
56
-
The event handler receives an argument of type [`InlineAIPromptCommandExecuteEventArgs`](slug:Telerik.Blazor.Components.InlineAIPromptCommandExecuteEventArgs). See the [example below](#example).
|`Command`|`AIPromptCommandDescriptor`| The executed command. |
63
-
|`Output`|`string`| The output based on the executed command. |
64
-
|`IsCancelled`|`bool`| Whether the event is cancelled and the built-in action is prevented. |
65
-
|`OutputItem`|`InlineAIPromptOutputItemDescriptor`| The output item. This property will be populated only when the user retries an existing output. See [`InlineAIPromptOutputItemDescriptor`](slug:Telerik.Blazor.Components.InlineAIPromptOutputItemDescriptor). |
47
+
The event handler receives an argument of type [`InlineAIPromptCommandExecuteEventArgs` API reference](slug:Telerik.Blazor.Components.InlineAIPromptCommandExecuteEventArgs). See the [example below](#example).
66
48
67
49
## PromptChanged
68
50
@@ -76,11 +58,10 @@ The `PromptChanged` event fires when the user changes the prompt text. Use the e
Copy file name to clipboardExpand all lines: components/inlineaiprompt/overview.md
+28-44Lines changed: 28 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,28 +10,26 @@ position: 0
10
10
11
11
# Blazor InlineAIPrompt Overview
12
12
13
-
The UI for Blazor InlineAIPrompt is a popup-based component that lets you interact with AI language models right inside your content.
13
+
The Telerik InlineAIPrompt for Blazor is a popup-based component that lets you interact with AI language models right inside your content.
14
14
15
-
It provides a simple and focused way to send prompts and get responses from AI without interrupting the user’s flow. The InlineAIPrompt is great for adding contextual AI help exactly where users need it.
15
+
The InlineAIPrompt provides a simple and focused way to send prompts and get responses from AI without interrupting the user’s flow. The InlineAIPrompt is great for adding contextual AI help exactly where users need it.
16
16
17
17
## Creating Blazor InlineAIPrompt
18
18
19
19
1. Add the `<TelerikInlineAIPrompt>` tag.
20
20
2. Subscribe to the `OnPromptRequest` event that will fire whenever the user sends a prompt request. The handler expects an argument of type `InlineAIPromptPromptRequestEventArgs`.
@@ -87,44 +85,30 @@ It provides a simple and focused way to send prompts and get responses from AI w
87
85
88
86
## Streaming
89
87
90
-
The InlineAIPrompt component supports streaming responses, letting users view AI-generated content in real time as it’s created. [Read more about the Blazor InlineAIPrompt streaming...](slug:inlineaiprompt-streaming)
88
+
The InlineAIPrompt component supports streaming responses, which lets users view AI-generated content in real time as it’s created. [Read more about the Blazor InlineAIPrompt streaming...](slug:inlineaiprompt-streaming)
91
89
92
90
## Events
93
91
94
-
The InlineAIPrompt component offers several events that allow developers to handle user interactions and processes effectively. [Read more about the Blazor InlineAIPrompt events...](slug:inlineaiprompt-events)
92
+
The InlineAIPrompt component offers several events that allow developers to handle user interactions effectively. [Read more about the Blazor InlineAIPrompt events...](slug:inlineaiprompt-events)
95
93
96
-
## InlineAIPrompt Parameters
94
+
## InlineAIPrompt API
97
95
98
-
The following table lists the InlineAIPrompt parameters. Also check the [InlineAIPrompt API Reference](slug:Telerik.Blazor.Components.TelerikInlineAIPrompt) for a full list of all properties, methods and events.
| Parameter | Type and Default Value | Description |
103
-
| --- | --- | --- |
104
-
|`Class`|`string`|`The class that is rendered on the .k-prompt element.`|
105
-
|`Commands`|`List<AIPromptCommandDescriptor>`|`Configures predefined commands for the component.`|
106
-
|`EnableSpeechToText`|`bool`|`Specifies whether to enable speech to text functionality.`|
107
-
|`OutputActions`|`List<AIPromptOutputActionDescriptor>`|`Defines the output actions.`|
108
-
|`Placeholder`|`string`|`Placeholder text for the input field.`|
109
-
|`Prompt`|`string`|`The value of the text field and the prompt that is sent to the AI service.`|
110
-
|`PromptContext`|`string`|`Defines the additional context that is passed with the input/command prompt and system prompt.`|
111
-
|`SystemPrompt`|`string`|`Defines the system prompt that is used when the component is integrated with MEAI.`|
96
+
Get familiar with all InlineAIPrompt parameters, methods, events, and nested tags in the [InlineAIPrompt API Reference](slug:Telerik.Blazor.Components.TelerikInlineAIPrompt).
112
97
113
98
### Settings and Commands
114
99
115
-
The InlineAIPrompt exposes settings for itself and its speech to text button. To configure the options, declare a `<InlineAIPromptPopupSettings>` or `InlineAIPromptSpeechToTextButtonSettings` tag inside a `<InlineAIPromptSettings>` tag.
100
+
The InlineAIPrompt exposes settings for its popup and its embedded [Speech to Text Button](slug:speechtotextbutton-overview). To configure the options, declare a `<InlineAIPromptPopupSettings>` or `<InlineAIPromptSpeechToTextButtonSettings>` tag inside `<InlineAIPromptSettings>`.
116
101
117
-
The InlineAIPrompt component also exposes an option to set predefined commands. To configure the actions, use the `Commands` parameter and subscribe to the `OnCommandExecute` event that will fire whenever the user executes a command. The handler expects an argument of type `InlineAIPromptCommandExecuteEventArgs`.
102
+
The InlineAIPrompt component also exposes an option to set predefined commands, which is a predefined prompt that is processed immediately. To configure the actions, use the `Commands` parameter and subscribe to the `OnCommandExecute` event that will fire whenever the user executes a command. The handler expects an argument of type `InlineAIPromptCommandExecuteEventArgs`.
Copy file name to clipboardExpand all lines: components/inlineaiprompt/streaming.md
+16-14Lines changed: 16 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,11 @@ position: 5
10
10
11
11
# Streaming AI Responses with InlineAIPrompt
12
12
13
-
The UI for Blazor InlineAIPrompt component supports streaming responses, allowing users to see AI-generated content as it is being produced. This feature improves the user experience by providing immediate feedback and a more interactive interface.
13
+
The Blazor InlineAIPrompt component supports streaming responses, allowing users to see AI-generated content as it is being produced. This feature improves the user experience by providing immediate feedback and a more interactive interface.
14
14
15
15
Streaming is particularly useful when:
16
16
17
-
* Working with long-form AI responses that take several seconds to generate.
17
+
* Working with long-form AI responses that take more time to generate.
18
18
* Creating inline editing interfaces where users expect real-time feedback.
19
19
* Integrating with AI services that support chunked responses.
20
20
* Enhancing user engagement in contextual AI assistance scenarios.
@@ -30,7 +30,7 @@ This event is fired when the user clicks the Stop Generation button. You can use
30
30
When implementing real AI model streaming logic:
31
31
32
32
* Replace the sample `OutputChunks` loop with your actual AI model streaming code.
33
-
* Each time a new piece of text arrives from the AI model, call `AppendOutput` to update the InlineAIPrompt output area.
33
+
* Each time a new piece of response arrives from the AI model, call `AppendOutput` to update the InlineAIPrompt output area.
34
34
* If the user clicks the Stop Generation button, cancel the AI request in `OnPromptRequestStop`.
35
35
36
36
## Example
@@ -43,11 +43,10 @@ When implementing real AI model streaming logic:
0 commit comments