New to Kendo UI for AngularStart a free 30-day trial

AIPromptComponent

Represents the Kendo UI AIPrompt component for Angular.

html
<kendo-aiprompt
  [promptCommands]="commands"
  [promptSuggestions]="suggestions"
  [promptOutputs]="outputs"
  [showOutputRating]="true"
  (promptRequest)="onPromptRequest($event)">
</kendo-aiprompt>

Selector

kendo-aiprompt

Export Name

Accessible in templates as #kendoAIPromptInstance="kendoAIPrompt"

Inputs

NameTypeDefaultDescription

activeView

number

The active view index of the AIPrompt component.

disabledGenerateButton

boolean

false

Sets the disabled state for the Generate button in the Prompt view.

generateButtonIcon

string

'sparkles'

Sets the icon for the Generate button in the Prompt view.

generateButtonSVGIcon

SVGIcon

Sets the SVG icon for the Generate button in the Prompt view.

promptCommands

PromptCommand[]

Sets the collection of commands to render in the Command view.

promptOutputs

PromptOutput[]

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

false

Specifies whether the rating buttons appear in each Output view card. The rating buttons do not appear by default.

speechToTextButton

boolean | SpeechToTextButtonSettings

Sets the settings for the Speech to Text button in the Prompt view.

streaming

boolean

false

Specifies whether the Stop generation button appears in the Output view. The Stop generation button does not appear by default.

textAreaSettings

TextAreaSettings

Sets the settings for the TextArea in the Prompt view. Use this property to customize the TextArea appearance.

Events

NameTypeDescription

activeViewChange

EventEmitter<number>

Fires when the activeView property is updated. Use this event for two-way binding of the activeView property.

commandExecute

EventEmitter<CommandExecuteEvent>

Fires when you click a Command view command. The event data contains the selected command.

outputCopy

EventEmitter<PromptOutput>

Fires when you click a Copy button in any Output view card.

outputRatingChange

EventEmitter<OutputRatingChangeEvent>

Fires when you click a rating button in any Output view card.

promptRequest

EventEmitter<PromptRequestEvent>

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.

promptRequestCancel

EventEmitter<void>

Fires when you click the Stop Generation button in the Output view.

Methods

focus

Focuses the first focusable element in the AIPrompt component.

In this article
SelectorExport NameInputsEventsMethods
Not finding the help you need?
Contact Support