AIPromptComponent
Represents the Kendo UI AIPrompt component for Angular.
Definition
Package:@progress/kendo-angular-conversational-ui
Selector:kendo-aiprompt
Export Name:Accessible in templates as #kendoAIPromptInstance="kendoAIPrompt"
Syntax:
<kendo-aiprompt
[promptCommands]="commands"
[promptSuggestions]="suggestions"
[promptOutputs]="outputs"
[showOutputRating]="true"
(promptRequest)="onPromptRequest($event)">
</kendo-aiprompt>
Inputs
activeView
number
The active view index of the AIPrompt component.
disabledGenerateButton
boolean
Sets the disabled state for the Generate button in the Prompt view.
false
generateButtonIcon
string
Sets the icon for the Generate button in the Prompt view.
'sparkles'
generateButtonSVGIcon
SVGIcon
Sets the SVG icon for the Generate button in the Prompt view.
sparklesIcon
Sets the collection of commands to render in the Command view.
Sets the collection of generated prompt outputs to render in the Output view.
promptSuggestions
string[]
Sets the collection of suggestions to render in the Prompt view.
showOutputRating
boolean
Specifies whether the rating buttons appear in each Output view card. The rating buttons do not appear by default.
false
speechToTextButton
boolean | SpeechToTextButtonSettings
Sets the settings for the Speech to Text button in the Prompt view (see example).
streaming
boolean
Specifies whether the Stop generation button appears in the Output view. The Stop generation button does not appear by default.
false
textAreaSettings
TextAreaSettings
Sets the settings for the TextArea in the Prompt view (see example).
Events
activeViewChange
EventEmitter<number>
Fires when the activeView property is updated.
Use this event for two-way binding of the activeView property.
Fires when you click a Command view command. The event data contains the selected command.
Fires when you click a Copy button in any Output view card.
Fires when you click a rating button in any Output view card.
Fires when you click the Generate button in the Prompt view or the Retry button in the Output view.
Use the event's isRetry field to determine the source element.
Fires when you click the Stop Generation button in the Output view.
Methods
Focuses the first focusable element in the AIPrompt component.