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

AIAssistantToolbarDirective

Represents an AI Assistant tool of the Grid. Use this directive on any kendo-toolbar-button inside a ToolbarComponent in the Grid.

html
<kendo-grid>
     <kendo-toolbar>
        <kendo-toolbar-button kendoGridAIAssistantTool></kendo-toolbar-button>
     </kendo-toolbar>
</kendo-grid>

Selector

[kendoGridAIAssistantTool]

Inputs

NameTypeDefaultDescription

aiPromptSettings

GridToolbarAIPromptSettings

Configures the initial settings for the AI Prompt component that the AI Assistant Window component uses when opened.

aiWindowSettings

GridToolbarAIWindowSettings

Configures the initial settings for the AI Assistant Window when opened.

autoClose

boolean

true

Determines whether to close the AI Assistant Window automatically after a successful request.

keepOutputHistory

boolean

false

Determines whether to keep the AI Prompt's outputs after closing the AI Assistant Window.

requestOptions?

GridToolbarAIRequestOptions

{ headers: new HttpHeaders({ 'Content-Type': 'application/json' }), role: 'user', method: 'POST', responseType: 'json', withCredentials: false }

Configures the request options that the AI Assistant tool sends with the AI request.

requestUrl?

string

The URL to which the AI Assistant tool sends the AI request.

  • When you set this property, the AI Assistant tool sends and handles an HTTP request to the provided requestUrl. You can handle the promptRequest event to modify the request options before the tool sends it.
  • When you do not set this property, the AI Assistant tool does not send an HTTP request. You should handle the promptRequest event to send and handle a custom HTTP request.

Events

NameTypeDescription

cancelRequest

EventEmitter<undefined>

Emits an event when the user clicks the cancel button.

close

EventEmitter<undefined>

Emits an event when the AI Assistant tool closes.

open

EventEmitter<GridToolbarAIOpenEvent>

Emits an event when the AI Assistant tool opens.

promptRequest

EventEmitter<GridToolbarAIPromptRequestEvent>

Emits an event before the AI Assistant tool sends the AI request.

  • When you provide a requestUrl, you can handle the event to modify the request options.
  • When you do not provide a requestUrl, you can handle the event to perform an entirely custom request.

responseError

EventEmitter<GridToolbarAIResponseErrorEvent>

Emits an event when the AI Assistant tool completes the AI request with an error. The event contains the error response from the AI service and is preventable to allow stopping the default error handling.

responseSuccess

EventEmitter<GridToolbarAIResponseSuccessEvent>

Emits an event when the AI Assistant tool completes the AI request successfully. The event contains the response from the AI service and is preventable to allow stopping the default response handling.

Methods

toggleWindow

Toggles the AI Assistant window.

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