Class
ChatAIClientSettings

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

cs-api-definition
public sealed class ChatAIClientSettings : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseChatAIClientSettings

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Constructors

ChatAIClientSettings()

Declaration

cs-api-definition
public ChatAIClientSettings()

Properties

AIImageAltText

Specifies the alternative text for the AI author's image to use when OnAIResponse is not provided.

Declaration

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

Property Value

string

AIImageUrl

Specifies the URL of the AI author's image to use when OnAIResponse is not provided.

Declaration

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

Property Value

string

AIName

Specifies the display name of the AI author to use when OnAIResponse is not provided.

Declaration

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

Property Value

string

ChatClientKey

The unique key that identifies the client service used by the component for AI operations.

Declaration

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

Property Value

string

EnableHistory

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.

Declaration

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

Property Value

bool

EnableStreaming

Indicates whether streaming response is enabled for the AI client.

Declaration

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

Property Value

bool

HistoryMessageCount

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.

Declaration

cs-api-definition
[Parameter]
public int HistoryMessageCount { get; set; }

Property Value

int

OnAIResponse

Event callback that is invoked when the AI client produces a response.

Declaration

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

Property Value

EventCallback<ChatAIResponseEventArgs>

SystemPrompt

Defines the system prompt that is passed to the AI request.

Declaration

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

Property Value

string

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

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

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

Dispose()

Declaration

cs-api-definition
public void Dispose()

Implements IDisposable.Dispose()

OnInitialized()

Declaration

cs-api-definition
protected override void OnInitialized()

Overrides ComponentBase.OnInitialized()

OnParametersSet()

Declaration

cs-api-definition
protected override void OnParametersSet()

Overrides ComponentBase.OnParametersSet()

SetParametersAsync(ParameterView)

Declaration

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

Parameters

parameters

ParameterView

Returns

Task

Overrides ComponentBase.SetParametersAsync(ParameterView)