Class SfAIAssistView
Inherited Members
Namespace: Syncfusion.Blazor.InteractiveChat
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfAIAssistView : SfBaseComponent
Examples
<SfAIAssistView>
<ChildContent>
<AssistViews>
<AssistView Header="AI Generation"></AssistView>
<CustomView Header="NoteBook"></CustomView>
</AssistViews>
</ChildContent>
</SfAIAssistView>
Constructors
SfAIAssistView()
Declaration
public SfAIAssistView()
Properties
ActiveView
Gets or sets the index of the active view in the SfAIAssistView component.
Declaration
public int ActiveView { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | An integer representing the index of the active view. The default value is 0. |
Remarks
This property determines which view is currently active and visible in the SfAIAssistView component.
ChildContent
Gets or sets a value that indicates the child content for the AIAssist.
Declaration
public RenderFragment ChildContent { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.RenderFragment |
Created
Event raised when the SfAIAssistView is created.
Declaration
public EventCallback<object> Created { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Remarks
This event is triggered when the SfAIAssistView component is created.
CssClass
Gets or sets custom CSS classes for the SfAIAssistView component.
Declaration
public string CssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string containing CSS class names to customize the appearance. The default is |
Remarks
This property allows adding custom CSS classes for styling the SfAIAssistView component.
Height
Gets or sets the height of the SfAIAssistView component.
Declaration
public string Height { get; set; }
Property Value
Type | Description |
---|---|
System.String | The height of the SfAIAssistView component. The default is |
Remarks
This property specifies the height of the SfAIAssistView component.
ID
Sets id attribute for the AI Prompt.
Declaration
public string ID { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
Prompt
Gets or sets the prompt text in the SfAIAssistView component. Supports two-way binding.
Declaration
public string Prompt { get; set; }
Property Value
Type | Description |
---|---|
System.String | The text to be used as the prompt. The default is |
Remarks
This property represents the text input prompt for the SfAIAssistView component. Define @bind-Prompt to use two-way binding.
PromptChanged
Event raised when the prompt text is changed in the SfAIAssistView.
Declaration
public EventCallback<string> PromptChanged { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.String> |
Remarks
This event is triggered when the prompt text is changed in the SfAIAssistView component.
PromptIconCss
Gets or sets the CSS class for the prompter avatar in the SfAIAssistView component.
Declaration
public string PromptIconCss { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the CSS class for styling the avatar of each prompt. The default value is an empty string. |
Remarks
Use this property to apply custom styles to the prompt avatar in the SfAIAssistView component.
PromptPlaceholder
Gets or sets the placeholder text for the prompt input text area in the SfAIAssistView component.
Declaration
public string PromptPlaceholder { get; set; }
Property Value
Type | Description |
---|---|
System.String | The placeholder text displayed in the prompt input text area field. The default is |
Remarks
This property provides placeholder text to guide users on what to input in the prompt text area field in the SfAIAssistView component.
PromptRequested
Event raised when a prompt request is made in the SfAIAssistView.
Declaration
public EventCallback<AssistViewPromptRequestedEventArgs> PromptRequested { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<AssistViewPromptRequestedEventArgs> |
Remarks
This event is triggered when a prompt request is made in the SfAIAssistView component.
Prompts
Gets or sets the collection of prompts and their responses in the SfAIAssistView component.
Declaration
public List<AssistViewPrompt> Prompts { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<AssistViewPrompt> | A list of AssistViewPrompt representing the prompts. The default is an empty list. |
Remarks
This property holds the collection of provided prompts and their responses for the SfAIAssistView component.
PromptSuggestions
Gets or sets the list of prompt suggestions in the SfAIAssistView component.
Declaration
public List<string> PromptSuggestions { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.String> | A list of strings representing the prompt suggestions. The default is an empty list. |
Remarks
This property contains the suggestions that can be used as prompts in the SfAIAssistView component.
PromptSuggestionsHeader
Gets or sets the header text for the prompt suggestions in the SfAIAssistView component.
Declaration
public string PromptSuggestionsHeader { get; set; }
Property Value
Type | Description |
---|---|
System.String | The header text displayed above the prompt suggestions list. The default is |
Remarks
This property provides a header for the list of prompt suggestions in the SfAIAssistView component.
ResponseIconCss
Gets or sets the CSS class for the responder avatar in the SfAIAssistView component.
Declaration
public string ResponseIconCss { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the CSS class for styling the avatar of each response. The default value is an empty string. |
Remarks
Use this property to apply custom styles to the responder avatar in the SfAIAssistView component.
ShowHeader
Gets or sets a value indicating whether the header is displayed in the SfAIAssistView component.
Declaration
public bool ShowHeader { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
This property controls the visibility of the header in the SfAIAssistView component.
Width
Gets or sets the width of the SfAIAssistView component.
Declaration
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | The width of the SfAIAssistView component. The default is |
Remarks
This property specifies the width of the SfAIAssistView component.
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
ExecutePromptAsync(String)
Executes the prompts at dynamically to generate the respective output.
Declaration
public Task ExecutePromptAsync(string Prompt)
Parameters
Type | Name | Description |
---|---|---|
System.String | Prompt |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task. |
OnAfterRenderAsync(Boolean)
Method invoked after each time the component has been rendered.
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender | Set to true for the first time component rendering; otherwise gets false. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
Overrides
OnInitializedAsync()
Method invoked when the component is ready to start.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
Overrides
OnParametersSetAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |