ClassGridToolBarSmartBoxToolAIAssistantSettings
Specifies settings.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class GridToolBarSmartBoxToolAIAssistantSettings : GridToolBarSmartBoxToolSearchSettingsBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseBaseComponentGridToolBarSmartBoxToolSearchSettingsBaseGridToolBarSmartBoxToolAIAssistantSettings
Implements:
Inherited Members
Constructors
GridToolBarSmartBoxToolAIAssistantSettings()
Declaration
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
[Parameter]
public string ChatClientKey { get; set; }
Property Value
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
[Parameter]
public bool EnableSpeechToText { get; set; }
Property Value
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
[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
[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
[Parameter]
public string Placeholder { get; set; }
Property Value
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
[Parameter]
public RenderFragment<GridSmartBoxPromptSuggestionTemplateContext> PromptSuggestionTemplate { get; set; }
Property Value
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.
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
Overrides
SetParametersAsync(ParameterView)
Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
parameters
Returns
Overrides