RadAIPrompt
A component that bridges the gap between an app and the next-generation AI language model applications. Use the AIPrompt to provide your users with pre-determined ways to interact with a trained language model of your choice.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.ConversationalUI.dll
Syntax:
[TelerikToolboxCategory("ConversationalUI")]
public class RadAIPrompt : ItemsControl
Inheritance: objectRadAIPrompt
Constructors
Initializes a new instance of the RadAIPrompt class.
public RadAIPrompt()
Fields
ActiveItemProperty
DependencyProperty
Identifies the ActiveItem dependency property.
public static readonly DependencyProperty ActiveItemProperty
AreSuggestionsVisibleProperty
DependencyProperty
Identifies the AreSuggestionsVisible property.
public static readonly DependencyProperty AreSuggestionsVisibleProperty
CommandsProperty
DependencyProperty
Identifies the Commands property.
public static readonly DependencyProperty CommandsProperty
CurrentPageIndexProperty
DependencyProperty
Identifies the CurrentPageIndex property.
public static readonly DependencyProperty CurrentPageIndexProperty
HeaderBackgroundProperty
DependencyProperty
Identifies the HeaderBackground property.
public static readonly DependencyProperty HeaderBackgroundProperty
HeaderMinHeightProperty
DependencyProperty
Identifies the HeaderMinHeight property.
public static readonly DependencyProperty HeaderMinHeightProperty
InputButtonContentProperty
DependencyProperty
Identifies the InputButtonContent property.
public static readonly DependencyProperty InputButtonContentProperty
InputButtonContentTemplateProperty
DependencyProperty
Identifies the InputButtonContentTemplate property.
public static readonly DependencyProperty InputButtonContentTemplateProperty
InputTextBoxStyleProperty
DependencyProperty
Identifies the InputTextBoxStyle property.
public static readonly DependencyProperty InputTextBoxStyleProperty
InputTextProperty
DependencyProperty
Identifies the InputText property.
public static readonly DependencyProperty InputTextProperty
IsPagingEnabledProperty
DependencyProperty
Identifies the IsPagingEnabled property.
public static readonly DependencyProperty IsPagingEnabledProperty
MoveToFirstPageCommandProperty
DependencyProperty
Identifies the MoveToFirstPageCommand dependency property.
public static readonly DependencyProperty MoveToFirstPageCommandProperty
MoveToLastPageCommandProperty
DependencyProperty
Identifies the MoveToLastPageCommand dependency property.
public static readonly DependencyProperty MoveToLastPageCommandProperty
MoveToNextPageCommandProperty
DependencyProperty
Identifies the MoveToNextPageCommand dependency property.
public static readonly DependencyProperty MoveToNextPageCommandProperty
MoveToPreviousPageCommandProperty
DependencyProperty
Identifies the MoveToPreviousPageCommand dependency property.
public static readonly DependencyProperty MoveToPreviousPageCommandProperty
OutputItemCopyCommandProperty
DependencyProperty
Identifies the OutputItemCopyCommand property.
public static readonly DependencyProperty OutputItemCopyCommandProperty
OutputItemRatingChangedCommandProperty
DependencyProperty
Identifies the OutputItemRatingChangedCommand property.
public static readonly DependencyProperty OutputItemRatingChangedCommandProperty
OutputItemRetryCommandProperty
DependencyProperty
Identifies the OutputItemRetryCommand property.
public static readonly DependencyProperty OutputItemRetryCommandProperty
OutputItemsProperty
DependencyProperty
Identifies the OutputItems property.
public static readonly DependencyProperty OutputItemsProperty
PageCountProperty
DependencyProperty
Identifies the PageCount dependency property.
public static readonly DependencyProperty PageCountProperty
PagedOutputItemsProperty
DependencyProperty
Identifies the PagedOutputItems dependency property.
public static readonly DependencyProperty PagedOutputItemsProperty
PageSizeProperty
DependencyProperty
Identifies the PageSize property.
public static readonly DependencyProperty PageSizeProperty
PromptRequestCommandProperty
DependencyProperty
Identifies the PromptRequestCommand property.
public static readonly DependencyProperty PromptRequestCommandProperty
PromptRequestEvent
RoutedEvent
Identifies the event.
public static readonly RoutedEvent PromptRequestEvent
SuggestionClickedCommandProperty
DependencyProperty
Identifies the SuggestionClickedCommand property.
public static readonly DependencyProperty SuggestionClickedCommandProperty
SuggestionItemTemplateProperty
DependencyProperty
Identifies the SuggestionItemTemplate property.
public static readonly DependencyProperty SuggestionItemTemplateProperty
SuggestionsExpanderStyleProperty
DependencyProperty
Identifies the SuggestionsExpanderStyle property.
public static readonly DependencyProperty SuggestionsExpanderStyleProperty
SuggestionsHeaderContentProperty
DependencyProperty
Identifies the SuggestionsHeaderContent property.
public static readonly DependencyProperty SuggestionsHeaderContentProperty
SuggestionsHeaderContentTemplateProperty
DependencyProperty
Identifies the SuggestionsHeaderContentTemplate property.
public static readonly DependencyProperty SuggestionsHeaderContentTemplateProperty
SuggestionsProperty
DependencyProperty
Identifies the Suggestions property.
public static readonly DependencyProperty SuggestionsProperty
Properties
Gets the currently active item.
public RadAIPromptItem ActiveItem { get; }
Gets or sets a boolean value indicating whether the RadExpander that displays the input suggestions is visible.
public bool AreSuggestionsVisible { get; set; }
Gets or sets the AIPrompt commands.
public IList<AIPromptCommandBase> Commands { get; set; }
Gets of sets the index of the current page (starting from 1) in the output view.
public int CurrentPageIndex { get; set; }
HeaderBackground
Brush
Gets or sets the header background.
public Brush HeaderBackground { get; set; }
Gets or sets the header min height.
public double HeaderMinHeight { get; set; }
Gets or sets the Content of the input button.
public object InputButtonContent { get; set; }
InputButtonContentTemplate
DataTemplate
Gets or sets the DataTemplate applied to the property of the input button.
public DataTemplate InputButtonContentTemplate { get; set; }
InputTextBoxStyle
Style
Gets or sets the style that is to be applied to the input textbox. The style should target RadWatermarkTextBox.
public Style InputTextBoxStyle { get; set; }
Gets of sets a boolean value indicating whether the AIPromptOutputItems should be paged in the output view.
public bool IsPagingEnabled { get; set; }
Gets or sets the command responsible for changing the current page to the first one in the output view.
public DelegateCommand MoveToFirstPageCommand { get; set; }
Gets or sets the command responsible for changing the current page to the last one in the output view.
public DelegateCommand MoveToLastPageCommand { get; set; }
Gets or sets the command responsible for changing the current page to the next one in the output view.
public DelegateCommand MoveToNextPageCommand { get; set; }
Gets or sets the command responsible for changing the current page to the previous one in the output view.
public DelegateCommand MoveToPreviousPageCommand { get; set; }
Gets or sets the command that is executed when the copy button in an AIPromptOutputItem is clicked.
public ICommand OutputItemCopyCommand { get; set; }
Gets or sets the command that is executed when the rating of an AIPromptOutputItem is changed through the UI.
public ICommand OutputItemRatingChangedCommand { get; set; }
Gets or sets the command that is executed when the retry button in an AIPromptOutputItem is clicked.
public ICommand OutputItemRetryCommand { get; set; }
Gets or sets the output items (the responses from the AI).
public ObservableCollection<AIPromptOutputItemModel> OutputItems { get; set; }
Gets the number of pages currently displayed in the output view.
public int PageCount { get; }
Gets the collection view that holds the paged output items.
public QueryableCollectionView PagedOutputItems { get; }
Gets of sets the number of items to display in a single page in the output view.
public int PageSize { get; set; }
Gets or sets the command that is executed when the end-user makes a request by pressing the input button or a command.
public ICommand PromptRequestCommand { get; set; }
Gets or sets the command that is executed when an input suggestion is clicked.
public ICommand SuggestionClickedCommand { get; set; }
SuggestionItemTemplate
DataTemplate
Gets or sets DataTemplate applied to the that displays the Suggestions collection.
public DataTemplate SuggestionItemTemplate { get; set; }
Gets or sets the suggestions. The default SuggestionItemTemplate expects string objects.
public IEnumerable Suggestions { get; set; }
You can populate this collection with objects from a custom class and set the SuggestionItemTemplate property to customize their UI.
Gets or sets Style applied to the RadExpander that displays the Suggestions collection.
public Style SuggestionsExpanderStyle { get; set; }
Gets or sets the Content of the suggestions expander.
public object SuggestionsHeaderContent { get; set; }
SuggestionsHeaderContentTemplate
DataTemplate
Gets or sets the ContentTemplate of the suggestions expander.
public DataTemplate SuggestionsHeaderContentTemplate { get; set; }
Methods
GetContainerForItemOverride()
DependencyObject
protected override DependencyObject GetContainerForItemOverride()
DependencyObject
public override void OnApplyTemplate()
OnCreateAutomationPeer()
AutomationPeer
Returns an automation peer for this RadAIPrompt.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Called when a new item is added to the OutputItems collection.
protected virtual void OnOutputItemAdded()
Called when the copy button of an AIPromptOutputItem is clicked.
protected virtual void OnOutputItemCopy(AIPromptOutputItemModel outputItem)
The AIPromptOutputItemModel from the OutputItems collection.
Called when the rating of an AIPromptOutputItem is changed through the UI.
protected virtual void OnOutputItemRatingChanged(AIPromptOutputItemModel outputItem)
The AIPromptOutputItemModel from the OutputItems collection.
Called when the retry button of an AIPromptOutputItem is clicked.
protected virtual void OnOutputItemRetry(AIPromptOutputItemModel outputItem)
The AIPromptOutputItemModel from the OutputItems collection.
Called when the end-user makes a request by pressing the input button or a command.
protected virtual void OnPromptRequest(PromptRequestEventArgs args)
The PromptRequestEventArgs describing the event.
Called when a prompt suggestion is clicked.
protected virtual void OnSuggestionClicked(object suggestion)
The object from the Suggestions collection.
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Resets the theme.
public void ResetTheme()
Events
Event is raised when the user initiates a prompt request.
public event EventHandler<PromptRequestEventArgs> PromptRequest