New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Kendo UI InlineAIPrompt component

Definition

Constructors

Initializes a new instance of the InlineAIPrompt class.

C#
public InlineAIPrompt(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
Parameters:viewContextViewContext

The view context

initializerIJavaScriptInitializer

The JavaScriptInitializer

urlGeneratorIUrlGenerator

The URL generator.

Properties

Defines the commands for the AI tool. The commands are displayed in the AI tool dropdown.

C#
public List<EditorAICommandSettings> Commands { get; set; }

Specifies whether the underlying TextArea widget will be disabled or not.

C#
public bool? Enable { get; set; }

Specifies whether the prompt outputs are HTML-encoded before being displayed in the output view. When set to true (default), the output is encoded and displayed as plain text, preventing any HTML formatting or scripts from being rendered.

C#
public bool? EncodedPromptOutputs { get; set; }

Sets the widget in a streaming mode.

C#
public bool? IsStreaming { get; set; }

The text messages displayed in the prompt send and stop output retrieval buttons.

C#
public InlineAIPromptMessagesSettings Messages { get; set; }

An array of action configurations for the output cards. Can contain strings for built-in actions or objects with custom action properties.Built-in actions: - "copy" - Copy output content to clipboard. - "retry" - Retry generating the output. - "discard" - Clears the output content and closes the popup.Custom actions trigger the outputAction event with the action command and output data.

C#
public List<InlineAIPromptOutputAction> OutputActions { get; set; }

Specifies the placeholder text for the underlying TextArea widget.

C#
public string Placeholder { get; set; }

The options that will be used for the popup initialization. For more details about the available options refer to Popup documentation.

C#
public InlineAIPromptPopupSettings Popup { get; set; }

Specifies whether the underlying TextArea widget will be readonly or not.

C#
public bool? Readonly { get; set; }

A template function for customizing the display of output content. This function is called when an output's and final content needs to be rendered.The function receives an object with output (the output data) and prompt (the output prompt text) properties and should return HTML string.

C#
public string ResponseTemplate { get; set; }

The handler for the ResponseTemplate

C#
public string ResponseTemplateHandler { get; set; }

The id for the ResponseTemplate

C#
public string ResponseTemplateId { get; set; }

The URL of the AI service to use for generating outputs.

C#
public AIPromptServiceSettings Service { get; }

Configures speech-to-text functionality for the prompt input. When true, enables speech-to-text with default settings. When false, disables the feature. When an object, configures custom speech-to-text options.

C#
public InlineAIPromptSpeechToTextSettings SpeechToText { get; set; }

Sets the systemPrompt's format which will be send to the specified AI Service. Exposes both a context and prompt metadata.

C#
public ClientHandlerDescriptor SystemPrompt { get; set; }

Methods

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: WidgetBase.Serialize()

Writes the HTML.

C#
protected override void WriteHtml(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

The HtmlTextWriter.

Overrides: WidgetBase.WriteHtml(HtmlTextWriter)

Writes the initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The TextWriter.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)