Skip to content

Commit f911dd7

Browse files
committed
chore: polish aiprompt docs
1 parent f610abe commit f911dd7

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

components/aiprompt/events.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ The event handler receives an argument of type [`AIPromptCommandExecuteEventArgs
8888
| `IsCancelled` | `bool` | Whether the event is cancelled and the built-in action is prevented. |
8989
| `OutputItem` | `AIPromptOutputItemDescriptor` | The output item. This property will be populated only when the user retries an existing output. See [`AIPromptOutputItemDescriptor`](slug:Telerik.Blazor.Components.AIPromptOutputItemDescriptor). |
9090

91-
## PromptTextChanged
91+
## PromptChanged
9292

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

9595
## Example
9696

components/aiprompt/overview.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,23 +125,29 @@ To use component methods, define a reference to the AIPrompt instance with the `
125125

126126
## SpeechToTextButton Integration
127127

128-
To integrate a built-in SpeechToTextButton in the AIPrompt component, use the `<AIPromptSettings>` tag as a child of `<TelerikAIPrompt>`. Inside `<AIPromptSettings>`, define the `<AIPromptSpeechToTextButtonSettings>` tag to configure the appearance and behavior of the speech-to-text button. This approach is available when `EnableSpeechToText="true"` is set on the AIPrompt. For a complete list of available parameters, refer to the [AIPromptSpeechToTextButtonSettings API Reference](slug:Telerik.Blazor.Components.AIPrompt.AIPromptSpeechToTextButtonSettings).
128+
To integrate a built-in SpeechToTextButton in the AIPrompt component set `EnableSpeechToText="true"`. Optionally you can use the `<AIPromptSettings>` tag as a child of `<TelerikAIPrompt>`. Inside `<AIPromptSettings>`, you can define the `<AIPromptSpeechToTextButtonSettings>` tag to configure the appearance and behavior of the built-in SpeechToTextButton. For a complete list of available parameters, refer to the [AIPromptSpeechToTextButtonSettings API Reference](slug:Telerik.Blazor.Components.AIPromptSpeechToTextButtonSettings).
129129

130130
For advanced configuration options and more details about the SpeechToTextButton component, see the [SpeechToTextButton documentation](slug:speechtotextbutton-overview).
131131

132132
>caption Example of integrating the SpeechToTextButton in the AIPrompt component
133133
134134
````RAZOR.skip-repl
135-
<TelerikAIPrompt EnableSpeechToText="true">
135+
<TelerikAIPrompt EnableSpeechToText="true" Prompt="@Prompt" PromptChanged="@OnPromptChanged">
136136
<AIPromptSettings>
137137
<AIPromptSpeechToTextButtonSettings FillMode="@ThemeConstants.Button.FillMode.Outline"
138138
Size="@ThemeConstants.Button.Size.Large"
139139
Rounded="@ThemeConstants.Button.Rounded.Full"
140140
ThemeColor="@ThemeConstants.Button.ThemeColor.Primary"
141-
Lang="bg-BG"
142141
MaxAlternatives="3" />
143142
</AIPromptSettings>
144143
</TelerikAIPrompt>
144+
145+
@code {
146+
private void OnPromptChanged(string prompt)
147+
{
148+
Prompt = prompt;
149+
}
150+
}
145151
````
146152

147153
## Next Steps

0 commit comments

Comments
 (0)