Class
TelerikAIPrompt

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

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

Inheritance: objectComponentBaseBaseComponentAIPromptBaseTelerikAIPrompt

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.OnParametersSetAsync()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)

Constructors

TelerikAIPrompt()

Declaration

cs-api-definition
public TelerikAIPrompt()

Properties

AIPromptSettings

Defines the settings for the AI prompt component. Children: AIPromptSpeechToTextButtonSettings.

Declaration

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

Property Value

RenderFragment

AIPromptToolBar

Additional action buttons for the toolbar. These won't replace the buttons you got for the views. AIPromptToolBarButton, AIPromptToolBarSpacer and AIPromptToolBarTemplateItem items are supported. Children: AIPromptToolBarButton, AIPromptToolBarSpacer, AIPromptToolBarTemplateItem.

Declaration

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

Property Value

RenderFragment

AIPromptViews

Declaration

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

Property Value

RenderFragment

Commands

Defines the Commands of the component.

Declaration

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

Property Value

List<AIPromptCommandDescriptor>

EnableSpeechToText

Specifies whether to enable speech to text functionality.

Declaration

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

Property Value

bool

Height

Defines the height of the component.

Declaration

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

Property Value

string

OnCommandExecute

Declaration

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

Property Value

EventCallback<AIPromptCommandExecuteEventArgs>

OnOutputActionClick

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

Declaration

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

Property Value

EventCallback<AIPromptOutputActionClickEventArgs>

OnPromptRequest

Declaration

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

Property Value

EventCallback<AIPromptPromptRequestEventArgs>

OutputActions

Defines the output actions for each output.

Declaration

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

Property Value

List<AIPromptOutputActionDescriptor>

OutputItemTemplate

Defines the Output Item Template of the component.

Declaration

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

Property Value

RenderFragment<AIPromptOutputItemTemplateContext>

PromptSuggestionItemTemplate

Defines the Prompt Suggestion Item template of the component.

Declaration

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

Property Value

RenderFragment<AIPromptSuggestionItemTemplateContext>

PromptSuggestions

Defines the Prompt Suggestions of the component.

Declaration

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

Property Value

List<string>

Width

Defines the width of the component.

Declaration

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

Property Value

string

Methods

AddItem(IAIPromptToolBarItem)

Declaration

cs-api-definition
public void AddItem(IAIPromptToolBarItem item)

Parameters

item

IAIPromptToolBarItem

AddOutput(string, string, string, string, string, bool)

Add new Output item to the component.

Declaration

cs-api-definition
public void AddOutput(string output, string title, string subtitle, string prompt, string commandId, bool openOutputView = true)

Parameters

output

string

title

string

subtitle

string

prompt

string

commandId

string

openOutputView

bool

AddView(AIPromptViewBase)

Declaration

cs-api-definition
public void AddView(AIPromptViewBase item)

Parameters

item

AIPromptViewBase

BuildRenderTree(RenderTreeBuilder)

Declaration

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

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

OnAfterRenderAsync(bool)

Declaration

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

Parameters

firstRender

bool

Returns

Task

Overrides BaseComponent.OnAfterRenderAsync(bool)

OnParametersSet()

Declaration

cs-api-definition
protected override void OnParametersSet()

Overrides ComponentBase.OnParametersSet()

Refresh()

Re-renders the component.

Declaration

cs-api-definition
public void Refresh()

RemoveItem(IAIPromptToolBarItem)

Declaration

cs-api-definition
public void RemoveItem(IAIPromptToolBarItem item)

Parameters

item

IAIPromptToolBarItem

RemoveView(AIPromptViewBase)

Declaration

cs-api-definition
public void RemoveView(AIPromptViewBase item)

Parameters

item

AIPromptViewBase

SetActiveView(AIPromptViewBase, bool)

Declaration

cs-api-definition
protected void SetActiveView(AIPromptViewBase view, bool forceFocus = true)

Parameters

view

AIPromptViewBase

forceFocus

bool

SetParametersAsync(ParameterView)

Declaration

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

Parameters

parameters

ParameterView

Returns

Task

Overrides ComponentBase.SetParametersAsync(ParameterView)