Class
TelerikInlineAIPrompt

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

cs-api-definition
public class TelerikInlineAIPrompt : AIPromptBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentAIPromptBaseTelerikInlineAIPrompt

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members AIPromptBase.OnInitializedAsync()AIPromptBase.PromptContextAIPromptBase.SystemPromptAIPromptBase.OnPromptRequestStopAIPromptBase.PromptAIPromptBase.PromptChangedAIPromptBase.PromptPlaceholderBaseComponent.ShouldRender()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.OnParametersSetAsync()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)

Constructors

TelerikInlineAIPrompt()

Declaration

cs-api-definition
public TelerikInlineAIPrompt()

Properties

Commands

Defines the Commands of the component.

Declaration

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

Property Value

List<InlineAIPromptCommandDescriptor>

EnableSpeechToText

Specifies whether to enable speech to text functionality.

Declaration

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

Property Value

bool

InlineAIPromptSettings

Container to define settings.

Declaration

cs-api-definition
[Parameter]
public RenderFragment InlineAIPromptSettings { get; set; }

Property Value

RenderFragment

OnCommandExecute

Event callback that is triggered when a command is executed. If not provided the component will try to execute the command using an service.

Declaration

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

Property Value

EventCallback<InlineAIPromptCommandExecuteEventArgs>

OnOutputActionClick

Event callback that is triggered when an output action is clicked.

Declaration

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

Property Value

EventCallback<InlineAIPromptOutputActionClickEventArgs>

OnPromptRequest

Event callback that is triggered when a prompt request is made. If not provided the component will try to prmompt LLM using an service.

Declaration

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

Property Value

EventCallback<InlineAIPromptPromptRequestEventArgs>

OutputActions

Defines the output actions for each output.

Declaration

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

Property Value

List<InlineAIPromptOutputActionDescriptor>

OutputTemplate

Defines how the output items are displayed in the inline prompt.

Declaration

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

Property Value

RenderFragment<InlineAIPromptOutputItemTemplateContext>

Placeholder

Placeholder text for the input field.

Declaration

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

Property Value

string

Methods

AppendOutput(string)

Appends output to the current output item in the inline prompt.

Declaration

cs-api-definition
public void AppendOutput(string output)

Parameters

output

string

BuildRenderTree(RenderTreeBuilder)

Declaration

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

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

HideAsync()

Hides the inline prompt.

Declaration

cs-api-definition
public Task HideAsync()

Returns

Task

OnAfterRenderAsync(bool)

Declaration

cs-api-definition
protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender

bool

Returns

Task

Overrides BaseComponent.OnAfterRenderAsync(bool)

Refresh()

Refresh the component.

Declaration

cs-api-definition
public void Refresh()

SetParametersAsync(ParameterView)

Declaration

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

Parameters

parameters

ParameterView

Returns

Task

Overrides ComponentBase.SetParametersAsync(ParameterView)

ShowAsync(double, double)

Shows the inline prompt at defined coordinates.

Declaration

cs-api-definition
public Task ShowAsync(double clientX, double clientY)

Parameters

clientX

double

Coordinate for X axis.

clientY

double

Coordinate for Y axis.

Returns

Task