Angular AIPrompt Templates
The Kendo UI for Angular AIPrompt provides various templates that enable you to customize the rendering of its elements.
Toolbar Template
The Kendo UI for Angular AIPrompt enables you to render custom toolbar actions in addition to the views' buttons by using the AIPromptToolbarActionsDirective
directive.
The following example demonstrates how to display a custom close button.
Output Template
The AIPrompt component provides the ability to customize the appearance of the responses in the Output View that are returned by the AI model.
To implement an output template, apply the AIPromptOutputTemplateDirective
to an <ng-template>
tag nested inside the <kendo-aiprompt>
component. The current PromptOutput
object is available as template context by using the let-output
syntax.
The following example demonstrates how to customize the rendering of the responses in the Output View of the AIPrrompt component.
Output Body Template
The AIPrompt allows you to only customize the body of the returned responses in the Output View by using the AIPromptOutputBodyTemplateDirective
. This directive provides context about the current PromptOutput
object through the let-output
syntax.
The following example demonstrates how to modify the appearance of the response body in the Output View of the AIPrrompt.