Class
TelerikAIPrompt

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

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

Inheritance: objectComponentBaseBaseComponentTelerikAIPrompt

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members BaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()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>)

Constructors

TelerikAIPrompt()

Declaration

cs-api-definition
public TelerikAIPrompt()

Properties

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.

Declaration

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

Property Value

RenderFragment

AIPromptViews

The Views of the component.

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>

Height

Defines the height of the component.

Declaration

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

Property Value

string

OnCommandExecute

Called when the user executes command.

Declaration

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

Property Value

EventCallback<AIPromptCommandExecuteEventArgs>

OnOutputRate

Called when the users rate an output.

Declaration

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

Property Value

EventCallback<AIPromptOutputRateEventArgs>

OnPromptRequest

Called when the users send a Prompt Request.

Declaration

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

Property Value

EventCallback<AIPromptPromptRequestEventArgs>

OutputItemTemplate

Defines the Output Item Template of the component.

Declaration

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

Property Value

RenderFragment<AIPromptOutputItemTemplateContext>

Prompt

Defins the prompt text of the component.

Declaration

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

Property Value

string

PromptChanged

Called when the users changes the prompt text.

Declaration

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

Property Value

EventCallback<string>

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>

ShowOutputRating

Defins whether to show or hide rating buttons in the output card.

Declaration

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

Property Value

bool

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)