ChatAIClientSettings
Defines the settings of the Chat AI Client.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public sealed class ChatAIClientSettings : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseChatAIClientSettings
Implements:
Constructors
public ChatAIClientSettings()
Properties
Specifies the alternative text for the AI author's image to use when OnAIResponse is not provided.
[Parameter]
public string AIImageAltText { get; set; }
Specifies the URL of the AI author's image to use when OnAIResponse is not provided.
[Parameter]
public string AIImageUrl { get; set; }
Specifies the display name of the AI author to use when OnAIResponse is not provided.
[Parameter]
public string AIName { get; set; }
The unique key that identifies the client service used by the component for AI operations.
[Parameter]
public string? ChatClientKey { get; set; }
Enables or disables conversation history for the AI client.
When enabled, previous messages from the chat are sent as context to the AI service on each request.
The number of messages to include is controlled by HistoryMessageCount.
Default value is true.
[Parameter]
public bool EnableHistory { get; set; }
Indicates whether streaming response is enabled for the AI client.
[Parameter]
public bool EnableStreaming { get; set; }
Specifies the maximum number of messages to include in the conversation history sent to the AI client.
Older messages beyond this limit are excluded to manage context size and performance.
Only applies when EnableHistory is true.
Default value is int.MaxValue.
[Parameter]
public int HistoryMessageCount { get; set; }
Event callback that is invoked when the AI client produces a response.
[Parameter]
public EventCallback<ChatAIResponseEventArgs> OnAIResponse { get; set; }
Defines the system prompt that is passed to the AI request.
[Parameter]
public string SystemPrompt { get; set; }
Methods
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Overrides:
protected override void OnInitialized()
Overrides:
protected override void OnParametersSet()
Overrides:
public override Task SetParametersAsync(ParameterView parameters)
Overrides: