The Blazor AIPrompt component is a prompt box for one-shot AI tasks: suggested prompts, a streaming output panel and commands that refine the result - summarize, rewrite, translate - optionally applied to a piece of text.
Text to work on
Console log
Suggestions are prompts offered as buttons under the input. Commands appear under the output and send the current output with their Prompt to the model, replacing the output with the result.
Set Context to the text the prompts should apply to, for example the content or the selection of an editor; without it the prompt is sent on its own.
Bind Output or handle Generated to use the result in your application, and set ShowOutput="false" to render it elsewhere.
The component streams through the IChatClient configured for IAIChatService; SystemPrompt, ModelId, Temperature and MaxTokens tune the request.
AIChat is a conversation with memory and tool calling. AIPrompt is a single prompt with an output panel and commands such as summarize, rewrite or translate, often applied to a piece of text.
Yes. Set Context to the editor content or selection and every prompt, suggestion and command runs against it.
Radzen Blazor Components, © 2018-2026 Radzen.
Source Code licensed under
MIT
On this page