Blazor InlineAIPrompt Overview
The Telerik InlineAIPrompt for Blazor is a popup-based component that lets you interact with AI language models right inside your content.
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.
Creating Blazor InlineAIPrompt
- Add the
<TelerikInlineAIPrompt>tag. - Subscribe to the
OnPromptRequestevent that will fire whenever the user sends a prompt request. The handler expects an argument of typeInlineAIPromptPromptRequestEventArgs. - Set the
Promptparameter
Telerik Blazor InlineAIPrompt
Streaming
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...
Events
The InlineAIPrompt component offers several events that allow developers to handle user interactions effectively. Read more about the Blazor InlineAIPrompt events...
InlineAIPrompt API
Get familiar with all InlineAIPrompt parameters, methods, events, and nested tags in the InlineAIPrompt API Reference.
Settings and Commands
The InlineAIPrompt exposes settings for its popup and its embedded Speech to Text Button. To configure the options, declare a <InlineAIPromptPopupSettings> or <InlineAIPromptSpeechToTextButtonSettings> tag inside <InlineAIPromptSettings>.
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.
InlineAIPrompt Reference
Use the component reference to execute the following methods.
| Method | Description |
|---|---|
Refresh | Re-renders the component. |
ShowAsync | Shows the inline prompt at defined coordinates. Accepts two parameters: X and Y coordinates to position the popup. |
HideAsync | Hides the Inline AI Prompt. |