AIPrompt
Represents the Kendo UI for Vue AIPrompt component. Accepts properties of type AIPromptProps.
Definition
Package:@progress/kendo-vue-conversational-ui
Properties Interface:AIPromptProps
Syntax:
<AIPrompt
:active-view="activeView"
:toolbar-items="[promptViewDefaults, outputViewDefaults]"
:loading="isLoading"
:streaming="isStreaming"
:suggestions-view="'modern'"
@activeviewchange="onActiveViewChange"
@promptrequest="onPromptRequest"
>
<AIPromptView :prompt-suggestions="['Summarize order #10248']" />
<AIPromptOutputView :outputs="outputs" />
</AIPrompt>
Properties
activeView
string
Sets the name of the active view. The AIPrompt shows the view with the matching name.
dir?
string
Sets the dir HTML attribute of the AIPrompt. Use it to switch between LTR and RTL.
loading?
boolean
Sets the AIPrompt in a loading state. When you set it to true, the Output view shows a loading skeleton.
onActiveviewchange?
(name: string) => void
Fires when the active view changes. Exposes the name of the new active view as event data.
onCancel?
() => void
Fires when the user cancels the generation with the stop button or the Esc key.
onCommandexecute?
(command: AIPromptCommandInterface) => void
Fires each time the user clicks a command in the Commands view. Exposes the selected command as event data.
onPromptrequest?
(prompt: string, outputItem: AIPromptOutputInterface) => void
Fires when the user clicks the Generate button in the Prompt view, or the Retry or rating buttons in the Output view. Exposes the prompt and the related output as event data.
Sets the generated prompt outputs that the Output view renders.
promptPlaceholder?
string
Sets the placeholder text of the textarea in the Prompt view.
streaming?
boolean
Sets the AIPrompt in a streaming state. When you set it to true, the Output view shows a stop button.
The user can click it to cancel the generation.
Sets the style of the suggestions in the AIPrompt.
The available options are:
classic- Renders the suggestions with a rectangular style.modern- Renders the suggestions with a chip-like style.
'classic'
Sets the items of the Toolbar. These items replace the default Toolbar items.