New to Telerik UI for WPFStart a free 30-day trial

Provides data for the PromptRequest event.

Definition

Namespace:Telerik.Windows.Controls.ConversationalUI

Assembly:Telerik.Windows.Controls.ConversationalUI.dll

Syntax:

C#
public class InlineAIAssistantPromptRequestEventArgs : RoutedEventArgs

Inheritance: objectInlineAIAssistantPromptRequestEventArgs

Constructors

Initializes a new instance of the InlineAIAssistantPromptRequestEventArgs class with the specified prompt, selected text, and full text.

C#
public InlineAIAssistantPromptRequestEventArgs(string prompt, string selectedText, string fullText)
Parameters:promptstring

The prompt text that was requested by the user.

selectedTextstring

The currently selected text in the associated text control.

fullTextstring

The full text of the associated text control.

Properties

Gets a token that is signaled when the current response processing is cancelled.

C#
public CancellationToken CancellationToken { get; }

Gets the full text of the associated text control.

C#
public string FullText { get; }

Gets the prompt text that was requested by the user.

C#
public string Prompt { get; }

Gets the asynchronous stream of response text that will be sent back to the user.

C#
public IAsyncEnumerable<string> ResponseStream { get; }

Gets the currently selected text in the associated text control.

C#
public string SelectedText { get; }

Methods

Sets the asynchronous stream of response text that will be sent back to the user.

C#
public void SetResponse(IAsyncEnumerable<string> stream)
Parameters:streamIAsyncEnumerable<string>

The asynchronous stream of response text.

Sets the response text that will be sent back to the user as a single string.

C#
public void SetResponse(string immediateText)
Parameters:immediateTextstring

The immediate response text.