Class
GridToolBarSmartBoxToolAIAssistantSettings

Specifies settings.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

cs-api-definition
public class GridToolBarSmartBoxToolAIAssistantSettings : GridToolBarSmartBoxToolSearchSettingsBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentGridToolBarSmartBoxToolSearchSettingsBaseGridToolBarSmartBoxToolAIAssistantSettings

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members GridToolBarSmartBoxToolSearchSettingsBase.ChildContentGridToolBarSmartBoxToolSearchSettingsBase.EnabledBaseComponent.ShouldRender()BaseComponent.OnAfterRenderAsync(bool)BaseComponent.Dispose()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnInitialized()ComponentBase.OnParametersSet()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)

Constructors

GridToolBarSmartBoxToolAIAssistantSettings()

Declaration

cs-api-definition
public GridToolBarSmartBoxToolAIAssistantSettings()

Properties

ChatClientKey

Specifies the unique identifier for the AI chat client service to use for processing prompts. This key should match a registered service in your dependency injection container. Allows you to use different AI providers or configurations for different SmartBox instances. Example: Register services with different keys for OpenAI, Azure OpenAI, or local LLM instances.

Declaration

cs-api-definition
[Parameter]
public string ChatClientKey { get; set; }

Property Value

string

EnableSpeechToText

Controls whether the speech-to-text button is enabled in the AI assistant input. When true (default), users can click a microphone button to speak their prompts instead of typing. When false, the speech-to-text functionality is disabled and the button is hidden. Requires browser support for the Web Speech API and appropriate user permissions.

Declaration

cs-api-definition
[Parameter]
public bool EnableSpeechToText { get; set; }

Property Value

bool

OnPromptRequest

Fires when a user submits a prompt to the AI assistant in the Grid toolbar SmartBox. The event args (GridSmartBoxAIAssistantPromptRequestEventArgs) contain the user's prompt text and conversation context. Use this to integrate with AI services like OpenAI, Azure OpenAI, or custom LLM endpoints to process user requests. Implement your AI logic here to interpret the prompt and perform grid operations or provide responses. Works with ChatClientKey to identify which AI client service to use and OnPromptRequestStop to handle cancellation.

Declaration

cs-api-definition
[Parameter]
public EventCallback<GridSmartBoxAIAssistantPromptRequestEventArgs> OnPromptRequest { get; set; }

Property Value

EventCallback<GridSmartBoxAIAssistantPromptRequestEventArgs>

OnPromptRequestStop

Fires when a user cancels or stops an ongoing AI prompt request in the Grid toolbar SmartBox. The event args (GridSmartBoxAIAssistantPromptRequestStopEventArgs) provide information about the cancelled request. Use this to abort long-running AI operations, cancel API calls, or clean up resources. Important for managing streaming AI responses or preventing unnecessary processing costs.

Declaration

cs-api-definition
[Parameter]
public EventCallback<GridSmartBoxAIAssistantPromptRequestStopEventArgs> OnPromptRequestStop { get; set; }

Property Value

EventCallback<GridSmartBoxAIAssistantPromptRequestStopEventArgs>

Placeholder

Defines the placeholder text displayed in the AI assistant input when empty. Encourages users to interact conversationally with the AI. Defaults to a localized prompt. Example: "Ask me anything about this data..." or "How can I help you with this grid?".

Declaration

cs-api-definition
[Parameter]
public string Placeholder { get; set; }

Property Value

string

PromptSuggestionTemplate

Defines a custom template for rendering prompt suggestions in the AI assistant panel. The template receives a GridSmartBoxPromptSuggestionTemplateContext with the suggestion text and related data. Use this to style suggestions, add icons, or include additional context for each suggested prompt. If not provided, suggestions are rendered with default styling based on PromptSuggestions.

Declaration

cs-api-definition
[Parameter]
public RenderFragment<GridSmartBoxPromptSuggestionTemplateContext> PromptSuggestionTemplate { get; set; }

Property Value

RenderFragment<GridSmartBoxPromptSuggestionTemplateContext>

PromptSuggestions

Provides a list of suggested prompts to help users get started with the AI assistant. These suggestions appear in the UI as clickable prompt examples users can select. Example prompts: "Show me the top 10 products by sales", "Filter orders from last month", "Group by category and sum totals". Works with PromptSuggestionTemplate to customize how suggestions are displayed.

Declaration

cs-api-definition
[Parameter]
public List<string> PromptSuggestions { get; set; }

Property Value

List<string>

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

OnInitializedAsync()

Declaration

cs-api-definition
protected override Task OnInitializedAsync()

Returns

Task

Overrides GridToolBarSmartBoxToolSearchSettingsBase.OnInitializedAsync()

OnParametersSetAsync()

Declaration

cs-api-definition
protected override Task OnParametersSetAsync()

Returns

Task

Overrides GridToolBarSmartBoxToolSearchSettingsBase.OnParametersSetAsync()

SetParametersAsync(ParameterView)

Declaration

cs-api-definition
public override Task SetParametersAsync(ParameterView parameters)

Parameters

parameters

ParameterView

Returns

Task

Overrides GridToolBarSmartBoxToolSearchSettingsBase.SetParametersAsync(ParameterView)