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

Definition

Package:@progress/kendo-angular-conversational-ui

Selector:kendo-aiprompt

Export Name:Accessible in templates as #kendoAIPromptInstance="kendoAIPrompt"

Syntax:

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

Inputs

The active view index of the AIPrompt component.

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

Default:

false

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

Default:

'sparkles'

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

Default:

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.

Sets the collection of suggestions to render in the Prompt view.

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

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.

Default:

false

textAreaSettings

TextAreaSettings

Sets the settings for the TextArea in the Prompt view (see example).

Events

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.