RadAIPrompt
A component that bridges the gap between the Maui app and the next-generation AI language model applications. Use the AIPrompt to provide your users with with chat capabilities or pre-determined ways to interact with a trained language model of your choice.
Definition
Namespace:Telerik.Maui.Controls
Assembly:Telerik.Maui.Controls.dll
Syntax:
public class RadAIPrompt : RadBorderContentView, IRadContentView, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout
Inheritance: objectRadContentViewRadCompositeContentViewRadBorderContentViewRadAIPrompt
Implements:
Inherited Members
Constructors
Initializes a new instance of the class.
public RadAIPrompt()
Fields
AutoGenerateViewsProperty
BindableProperty
Identifies the AutoGenerateViews property.
public static readonly BindableProperty AutoGenerateViewsProperty
CommandGroupStyleProperty
BindableProperty
Identifies the CommandGroupStyle property.
public static readonly BindableProperty CommandGroupStyleProperty
CommandsProperty
BindableProperty
Identifies the Commands property.
public static readonly BindableProperty CommandsProperty
CommandStyleProperty
BindableProperty
Identifies the CommandStyle property.
public static readonly BindableProperty CommandStyleProperty
CommandTappedCommandProperty
BindableProperty
Identifies the CommandTappedCommand property.
public static readonly BindableProperty CommandTappedCommandProperty
ControlTemplateProperty
BindableProperty
Identifies the ControlTemplate property.
public static readonly BindableProperty ControlTemplateProperty
InputButtonStyleProperty
BindableProperty
Identifies the InputButtonStyle property.
public static readonly BindableProperty InputButtonStyleProperty
InputButtonTextProperty
BindableProperty
Identifies the InputButtonText property.
public static readonly BindableProperty InputButtonTextProperty
InputEditorStyleProperty
BindableProperty
Identifies the InputEditorStyle property.
public static readonly BindableProperty InputEditorStyleProperty
InputTextProperty
BindableProperty
Identifies the InputText property.
public static readonly BindableProperty InputTextProperty
OutputItemCopyCommandProperty
BindableProperty
Identifies the OutputItemCopyCommand property.
public static readonly BindableProperty OutputItemCopyCommandProperty
OutputItemRatingChangedCommandProperty
BindableProperty
Identifies the OutputItemRatingChangedCommand property.
public static readonly BindableProperty OutputItemRatingChangedCommandProperty
OutputItemRetryCommandProperty
BindableProperty
Identifies the OutputItemRetryCommand property.
public static readonly BindableProperty OutputItemRetryCommandProperty
OutputItemsProperty
BindableProperty
Identifies the Suggestions property.
public static readonly BindableProperty OutputItemsProperty
OutputItemStyleProperty
BindableProperty
Identifies the OutputItemStyle property.
public static readonly BindableProperty OutputItemStyleProperty
PromptRequestCommandProperty
BindableProperty
Identifies the PromptRequestCommand property.
public static readonly BindableProperty PromptRequestCommandProperty
SelectedIndexProperty
BindableProperty
Identifies the SelectedIndex property.
public static readonly BindableProperty SelectedIndexProperty
SuggestionsExpanderStyleProperty
BindableProperty
Identifies the SuggestionsExpanderStyle property.
public static readonly BindableProperty SuggestionsExpanderStyleProperty
SuggestionsHeaderTextProperty
BindableProperty
Identifies the SuggestionsHeaderText property.
public static readonly BindableProperty SuggestionsHeaderTextProperty
SuggestionsProperty
BindableProperty
Identifies the Suggestions property.
public static readonly BindableProperty SuggestionsProperty
SuggestionStyleProperty
BindableProperty
Identifies the SuggestionStyle property.
public static readonly BindableProperty SuggestionStyleProperty
TabViewStyleProperty
BindableProperty
Identifies the TabViewStyle property.
public static readonly BindableProperty TabViewStyleProperty
ViewsProperty
BindableProperty
Identifies the Views property.
public static readonly BindableProperty ViewsProperty
Properties
Gets or sets a value indicating whether to auto-generate views by default.
public bool AutoGenerateViews { get; set; }
CommandGroupStyle
Style
Gets or sets the style that is to be applied to the AIPromptCommandGroupView representing an AIPrompt command group.
public Style CommandGroupStyle { get; set; }
Gets or sets the AIPrompt commands.
public IList<AIPromptCommandBase> Commands { get; set; }
CommandStyle
Style
Gets or sets the style that is to be applied to the AIPrompt command.
public Style CommandStyle { get; set; }
Gets or sets the command that is executed when an AIPrompt command is pressed. The parameter of this command is of type AIPromptCommandBase.
public ICommand CommandTappedCommand { get; set; }
ControlTemplate
ControlTemplate
Gets or sets the template that defines the visual appearance of the view.
public ControlTemplate ControlTemplate { get; set; }
InputButtonStyle
Style
Gets or sets the style that is to be applied to the input button.
public Style InputButtonStyle { get; set; }
Gets or sets the text of the input button.
public string InputButtonText { get; set; }
InputEditorStyle
Style
Gets or sets the style that is to be applied to the input editor.
public Style InputEditorStyle { get; set; }
Gets or sets the command that is executed when the Copy button is pressed. The parameter of this command is of type AIPromptOutputItem.
public ICommand OutputItemCopyCommand { get; set; }
Gets or sets the command that is executed when the Rating of an output item changes. The parameter of this command is of type AIPromptOutputItem.
public ICommand OutputItemRatingChangedCommand { get; set; }
Gets or sets the command that is executed when the Retry button is pressed. The parameter of this command is of type AIPromptOutputItem.
public ICommand OutputItemRetryCommand { get; set; }
Gets or sets the output items (the responses from the ai).
public IList<AIPromptOutputItem> OutputItems { get; set; }
OutputItemStyle
Style
Gets or sets the style that is to be applied to the output items.
public Style OutputItemStyle { get; set; }
Gets or sets the index of the selected view.
public int SelectedIndex { get; set; }
Gets or sets the suggestions. The items of this collection can be simple string objects. In case more control over the UI is needed, the items in this collection can be objects from a custom class and the SuggestionStyle property can be used to set the ControlTemplate.
public IEnumerable Suggestions { get; set; }
Gets or sets the style that is to be applied to the RadExpander that contains the suggestions.
public Style SuggestionsExpanderStyle { get; set; }
Gets or sets the text of the suggestions header.
public string SuggestionsHeaderText { get; set; }
SuggestionStyle
Style
Gets or sets the style that is to be applied to the suggestions.
public Style SuggestionStyle { get; set; }
TabViewStyle
Style
Gets or sets the style that is to be applied to the RadTabView that represents the AIPrompt views.
public Style TabViewStyle { get; set; }
Gets or sets the AIPrompt views. The collection can contain the following types of views:
- AIPromptInputView: Provides input functionality for user prompts
- AIPromptOutputView: Displays AI responses and output items
- AIPromptCommandView: Shows predefined commands and actions
By default, these views are automatically generated when AutoGenerateViews is true. To manually define custom views, set AutoGenerateViews to false and populate this collection with your desired view instances.
public IList<AIPromptView> Views { get; set; }
Methods
protected override Size ArrangeOverride(Rect bounds)
Size
Events
Occurs when the end-user makes a request by pressing the input button or a command.
public event EventHandler PromptRequest