Skip to content

Commit 5e8684f

Browse files
authored
docs: add prompt suggestions to overview example (#3517)
* docs: add prompt suggestions to overview example * docs: fix tags formatting
1 parent 756abfd commit 5e8684f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

components/aiprompt/overview.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ For a complete list of available parameters and methods, refer to the [AIPrompt
9393
To use component methods, define a reference to the AIPrompt instance with the `@ref` directive. For example:
9494

9595
````RAZOR
96-
<TelerikAIPrompt @ref="@AIPromptRef" OnPromptRequest="@HandlePromptRequest"></TelerikAIPrompt>
96+
<TelerikAIPrompt @ref="@AIPromptRef"
97+
OnPromptRequest="@HandlePromptRequest"
98+
PromptSuggestions="@Suggestions">
99+
</TelerikAIPrompt>
97100
<div style="margin-top: 2em;">
98101
<TelerikTextBox @bind-Value="@CustomPrompt"></TelerikTextBox>
99102
<TelerikButton OnClick="@ExternalGenerateHandler">Generate</TelerikButton>
@@ -102,6 +105,11 @@ To use component methods, define a reference to the AIPrompt instance with the `
102105
@code {
103106
private string CustomPrompt { get; set; }
104107
private TelerikAIPrompt AIPromptRef { get; set; }
108+
private List<string> Suggestions { get; set; } = new List<string>()
109+
{
110+
"Explain quantum physics in simple terms.",
111+
"What are the three laws of thermodynamics?"
112+
};
105113
106114
private void ExternalGenerateHandler()
107115
{

0 commit comments

Comments
 (0)