Class 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.
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.ConversationalUI.dll
Syntax
[TelerikToolboxCategory("ConversationalUI")]
public class RadAIPrompt : ItemsControl, IThemable
Constructors
RadAIPrompt()
Initializes a new instance of the RadAIPrompt class.
Declaration
public RadAIPrompt()
Fields
ActiveItemProperty
Identifies the Active
Declaration
public static readonly DependencyProperty ActiveItemProperty
Field Value
System.
|
AreSuggestionsVisibleProperty
Identifies the Are
Declaration
public static readonly DependencyProperty AreSuggestionsVisibleProperty
Field Value
System.
|
CommandsProperty
Identifies the Commands property.
Declaration
public static readonly DependencyProperty CommandsProperty
Field Value
System.
|
CurrentPageIndexProperty
Identifies the Current
Declaration
public static readonly DependencyProperty CurrentPageIndexProperty
Field Value
System.
|
HeaderBackgroundProperty
Identifies the Header
Declaration
public static readonly DependencyProperty HeaderBackgroundProperty
Field Value
System.
|
HeaderMinHeightProperty
Identifies the Header
Declaration
public static readonly DependencyProperty HeaderMinHeightProperty
Field Value
System.
|
InputButtonContentProperty
Identifies the Input
Declaration
public static readonly DependencyProperty InputButtonContentProperty
Field Value
System.
|
InputButtonContentTemplateProperty
Identifies the Input
Declaration
public static readonly DependencyProperty InputButtonContentTemplateProperty
Field Value
System.
|
InputTextBoxStyleProperty
Identifies the Input
Declaration
public static readonly DependencyProperty InputTextBoxStyleProperty
Field Value
System.
|
InputTextProperty
Identifies the Input
Declaration
public static readonly DependencyProperty InputTextProperty
Field Value
System.
|
IsPagingEnabledProperty
Identifies the Is
Declaration
public static readonly DependencyProperty IsPagingEnabledProperty
Field Value
System.
|
MoveToFirstPageCommandProperty
Identifies the Move
Declaration
public static readonly DependencyProperty MoveToFirstPageCommandProperty
Field Value
System.
|
MoveToLastPageCommandProperty
Identifies the Move
Declaration
public static readonly DependencyProperty MoveToLastPageCommandProperty
Field Value
System.
|
MoveToNextPageCommandProperty
Identifies the Move
Declaration
public static readonly DependencyProperty MoveToNextPageCommandProperty
Field Value
System.
|
MoveToPreviousPageCommandProperty
Identifies the Move
Declaration
public static readonly DependencyProperty MoveToPreviousPageCommandProperty
Field Value
System.
|
OutputItemCopyCommandProperty
Identifies the Output
Declaration
public static readonly DependencyProperty OutputItemCopyCommandProperty
Field Value
System.
|
OutputItemRatingChangedCommandProperty
Identifies the Output
Declaration
public static readonly DependencyProperty OutputItemRatingChangedCommandProperty
Field Value
System.
|
OutputItemRetryCommandProperty
Identifies the Output
Declaration
public static readonly DependencyProperty OutputItemRetryCommandProperty
Field Value
System.
|
OutputItemsProperty
Identifies the Output
Declaration
public static readonly DependencyProperty OutputItemsProperty
Field Value
System.
|
PageCountProperty
Identifies the Page
Declaration
public static readonly DependencyProperty PageCountProperty
Field Value
System.
|
PagedOutputItemsProperty
Identifies the Paged
Declaration
public static readonly DependencyProperty PagedOutputItemsProperty
Field Value
System.
|
PageSizeProperty
Identifies the Page
Declaration
public static readonly DependencyProperty PageSizeProperty
Field Value
System.
|
PromptRequestCommandProperty
Identifies the Prompt
Declaration
public static readonly DependencyProperty PromptRequestCommandProperty
Field Value
System.
|
PromptRequestEvent
Identifies the event.
Declaration
public static readonly RoutedEvent PromptRequestEvent
Field Value
System.
|
SuggestionClickedCommandProperty
Identifies the Suggestion
Declaration
public static readonly DependencyProperty SuggestionClickedCommandProperty
Field Value
System.
|
SuggestionItemTemplateProperty
Identifies the Suggestion
Declaration
public static readonly DependencyProperty SuggestionItemTemplateProperty
Field Value
System.
|
SuggestionsExpanderStyleProperty
Identifies the Suggestions
Declaration
public static readonly DependencyProperty SuggestionsExpanderStyleProperty
Field Value
System.
|
SuggestionsHeaderContentProperty
Identifies the Suggestions
Declaration
public static readonly DependencyProperty SuggestionsHeaderContentProperty
Field Value
System.
|
SuggestionsHeaderContentTemplateProperty
Identifies the Suggestions
Declaration
public static readonly DependencyProperty SuggestionsHeaderContentTemplateProperty
Field Value
System.
|
SuggestionsProperty
Identifies the Suggestions property.
Declaration
public static readonly DependencyProperty SuggestionsProperty
Field Value
System.
|
Properties
ActiveItem
Gets the currently active item.
Declaration
public RadAIPromptItem ActiveItem { get; }
Property Value
AreSuggestionsVisible
Gets or sets a boolean value indicating whether the Rad
Declaration
public bool AreSuggestionsVisible { get; set; }
Property Value
System.
|
Commands
Gets or sets the AIPrompt commands.
Declaration
public IList<AIPromptCommandBase> Commands { get; set; }
Property Value
System.
|
CurrentPageIndex
Gets of sets the index of the current page (starting from 1) in the output view.
Declaration
public int CurrentPageIndex { get; set; }
Property Value
System.
|
HeaderBackground
Gets or sets the header background.
Declaration
public Brush HeaderBackground { get; set; }
Property Value
System.
|
HeaderMinHeight
Gets or sets the header min height.
Declaration
public double HeaderMinHeight { get; set; }
Property Value
System.
|
InputButtonContent
Gets or sets the Content of the input button.
Declaration
public object InputButtonContent { get; set; }
Property Value
System.
|
InputButtonContentTemplate
Gets or sets the System.
Declaration
public DataTemplate InputButtonContentTemplate { get; set; }
Property Value
System.
|
InputText
Gets or sets the input text.
Declaration
public string InputText { get; set; }
Property Value
System.
|
InputTextBoxStyle
Gets or sets the style that is to be applied to the input textbox. The style should target Rad
Declaration
public Style InputTextBoxStyle { get; set; }
Property Value
System.
|
IsPagingEnabled
Gets of sets a boolean value indicating whether the AIPromptOutputItems should be paged in the output view.
Declaration
public bool IsPagingEnabled { get; set; }
Property Value
System.
|
MoveToFirstPageCommand
Gets or sets the command responsible for changing the current page to the first one in the output view.
Declaration
public DelegateCommand MoveToFirstPageCommand { get; set; }
Property Value
MoveToLastPageCommand
Gets or sets the command responsible for changing the current page to the last one in the output view.
Declaration
public DelegateCommand MoveToLastPageCommand { get; set; }
Property Value
MoveToNextPageCommand
Gets or sets the command responsible for changing the current page to the next one in the output view.
Declaration
public DelegateCommand MoveToNextPageCommand { get; set; }
Property Value
MoveToPreviousPageCommand
Gets or sets the command responsible for changing the current page to the previous one in the output view.
Declaration
public DelegateCommand MoveToPreviousPageCommand { get; set; }
Property Value
OutputItemCopyCommand
Gets or sets the command that is executed when the copy button in an AIPrompt
Declaration
public ICommand OutputItemCopyCommand { get; set; }
Property Value
System.
|
OutputItemRatingChangedCommand
Gets or sets the command that is executed when the rating of an AIPrompt
Declaration
public ICommand OutputItemRatingChangedCommand { get; set; }
Property Value
System.
|
OutputItemRetryCommand
Gets or sets the command that is executed when the retry button in an AIPrompt
Declaration
public ICommand OutputItemRetryCommand { get; set; }
Property Value
System.
|
OutputItems
Gets or sets the output items (the responses from the AI).
Declaration
public ObservableCollection<AIPromptOutputItemModel> OutputItems { get; set; }
Property Value
System.
|
PageCount
Gets the number of pages currently displayed in the output view.
Declaration
public int PageCount { get; }
Property Value
System.
|
PagedOutputItems
Gets the collection view that holds the paged output items.
Declaration
public QueryableCollectionView PagedOutputItems { get; }
Property Value
PageSize
Gets of sets the number of items to display in a single page in the output view.
Declaration
public int PageSize { get; set; }
Property Value
System.
|
PromptRequestCommand
Gets or sets the command that is executed when the end-user makes a request by pressing the input button or a command.
Declaration
public ICommand PromptRequestCommand { get; set; }
Property Value
System.
|
SuggestionClickedCommand
Gets or sets the command that is executed when an input suggestion is clicked.
Declaration
public ICommand SuggestionClickedCommand { get; set; }
Property Value
System.
|
SuggestionItemTemplate
Gets or sets System.
Declaration
public DataTemplate SuggestionItemTemplate { get; set; }
Property Value
System.
|
Suggestions
Gets or sets the suggestions. The default Suggestion
Declaration
public IEnumerable Suggestions { get; set; }
Property Value
System.
|
Remarks
You can populate this collection with objects from a custom class and set the Suggestion
SuggestionsExpanderStyle
Gets or sets System.
Declaration
public Style SuggestionsExpanderStyle { get; set; }
Property Value
System.
|
SuggestionsHeaderContent
Gets or sets the Content of the suggestions expander.
Declaration
public object SuggestionsHeaderContent { get; set; }
Property Value
System.
|
SuggestionsHeaderContentTemplate
Gets or sets the ContentTemplate of the suggestions expander.
Declaration
public DataTemplate SuggestionsHeaderContentTemplate { get; set; }
Property Value
System.
|
Methods
GetContainerForItemOverride()
Declaration
protected override DependencyObject GetContainerForItemOverride()
Returns
System.
|
IsItemItsOwnContainerOverride(Object)
Declaration
protected override bool IsItemItsOwnContainerOverride(object item)
Parameters
System.
|
Returns
System.
|
OnApplyTemplate()
Declaration
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Returns an automation peer for this RadAIPrompt.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.
|
OnInitialized(EventArgs)
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System.
|
OnItemsChanged(NotifyCollectionChangedEventArgs)
Declaration
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters
System.
|
OnOutputItemAdded()
Called when a new item is added to the Output
Declaration
protected virtual void OnOutputItemAdded()
OnOutputItemCopy(AIPromptOutputItemModel)
Called when the copy button of an AIPrompt
Declaration
protected virtual void OnOutputItemCopy(AIPromptOutputItemModel outputItem)
Parameters
AIPrompt The AIPrompt |
OnOutputItemRatingChanged(AIPromptOutputItemModel)
Called when the rating of an AIPrompt
Declaration
protected virtual void OnOutputItemRatingChanged(AIPromptOutputItemModel outputItem)
Parameters
AIPrompt The AIPrompt |
OnOutputItemRetry(AIPromptOutputItemModel)
Called when the retry button of an AIPrompt
Declaration
protected virtual void OnOutputItemRetry(AIPromptOutputItemModel outputItem)
Parameters
AIPrompt The AIPrompt |
OnPromptRequest(PromptRequestEventArgs)
Called when the end-user makes a request by pressing the input button or a command.
Declaration
protected virtual void OnPromptRequest(PromptRequestEventArgs args)
Parameters
Prompt The Prompt |
OnSuggestionClicked(Object)
Called when a prompt suggestion is clicked.
Declaration
protected virtual void OnSuggestionClicked(object suggestion)
Parameters
System. The System. |
PrepareContainerForItemOverride(DependencyObject, Object)
Declaration
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters
System.
|
System.
|
ResetTheme()
Resets the theme.
Declaration
public void ResetTheme()
Events
PromptRequest
Event is raised when the user initiates a prompt request.
Declaration
public event EventHandler<PromptRequestEventArgs> PromptRequest
Event Type
System.
|