AIPromptBuilder
Defines the fluent API for configuring the Kendo AIPrompt for ASP.NET MVC.
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class AIPromptBuilder : WidgetBuilderBase<AIPrompt, AIPromptBuilder>, IHtmlString
Inheritance: objectWidgetBuilderBase<AIPrompt, AIPromptBuilder>AIPromptBuilder
Implements:
Inherited Members
Constructors
Methods
Specifies the index of the active view or the name of the view.
public AIPromptBuilder ActiveView(object value)
The value that configures the activeview.
Returns: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.
public AIPromptBuilder EncodedPromptOutputs(bool value)
The value that configures the encodedpromptoutputs.
Returns:Configures the client-side events.
public AIPromptBuilder Events(Action<AIPromptEventBuilder> configurator)
The client events action.
Returns:The text messages displayed in the component. Use this option to customize or localize the messages.
public AIPromptBuilder Messages(Action<AIPromptMessagesSettingsBuilder> configurator)
The action that configures the messages.
Returns: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.
public AIPromptBuilder OutputActions(Action<AIPromptOutputActionFactory> configurator)
The AIPromptOutputActionFactory for the outputactions setting.
Returns:Returns the current instance of AIPromptBuilder .
A template function for customizing the display of output content. This function is called when an output has finished streaming and final content needs to be rendered.The function receives an object with output (the output data) and content (the output text) properties and should return HTML string.
public AIPromptBuilder OutputTemplate(string value)
The value that configures the outputtemplate.
Returns:A template function for customizing the display of output content. This function is called when an output has finished streaming and final content needs to be rendered.The function receives an object with output (the output data) and content (the output text) properties and should return HTML string.
public AIPromptBuilder OutputTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the outputtemplate.
Returns:A template function for customizing the display of output content. This function is called when an output has finished streaming and final content needs to be rendered.The function receives an object with output (the output data) and content (the output text) properties and should return HTML string.
public AIPromptBuilder OutputTemplateHandler(string value)
The value that configures the outputtemplate.
Returns:A template function for customizing the display of output content. This function is called when an output has finished streaming and final content needs to be rendered.The function receives an object with output (the output data) and content (the output text) properties and should return HTML string.
public AIPromptBuilder OutputTemplateId(string value)
The value that configures the outputtemplate.
Returns:A template function for customizing the display of output content. This function is called when an output has finished streaming and final content needs to be rendered.The function receives an object with output (the output data) and content (the output text) properties and should return HTML string.
public AIPromptBuilder OutputTemplateView(MvcHtmlString value)
The value that configures the outputtemplate.
Returns:An array of prompt outputs to display in the prompt view.
public AIPromptBuilder PromptOutputs(Action<AIPromptPromptOutputFactory> configurator)
The action that configures the promptoutputs.
Returns:The template of the prompt suggestion item. It can be a string, a function or a Kendo Template.
public AIPromptBuilder PromptSuggestionItemTemplate(string value)
The value that configures the promptsuggestionitemtemplate.
Returns:The template of the prompt suggestion item. It can be a string, a function or a Kendo Template.
public AIPromptBuilder PromptSuggestionItemTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the promptsuggestionitemtemplate.
Returns:The template of the prompt suggestion item. It can be a string, a function or a Kendo Template.
public AIPromptBuilder PromptSuggestionItemTemplateHandler(string value)
The value that configures the promptsuggestionitemtemplate.
Returns:The template of the prompt suggestion item. It can be a string, a function or a Kendo Template.
public AIPromptBuilder PromptSuggestionItemTemplateId(string value)
The value that configures the promptsuggestionitemtemplate.
Returns:The template of the prompt suggestion item. It can be a string, a function or a Kendo Template.
public AIPromptBuilder PromptSuggestionItemTemplateView(MvcHtmlString value)
The value that configures the promptsuggestionitemtemplate.
Returns:Sets the PromptSuggestions collection
public AIPromptBuilder PromptSuggestions(ICollection<string> value)
The collection
Returns:Adds a suggestion to the PromptSuggestions collection.
public AIPromptBuilder PromptSuggestions(string value)
The suggestion
Returns:Configuration options for the Kendo UI TextArea component used in the prompt view. Only specific properties from the Kendo UI TextArea are supported.
public AIPromptBuilder PromptTextArea(Action<AIPromptPromptTextAreaSettingsBuilder> configurator)
The action that configures the prompttextarea.
Returns:The URL of the AI service to use for generating outputs.
public AIPromptBuilder Service(Action<AIPromptServiceSettingsBuilder> configurator)
The action that configures the service.
Returns:Specifies the URL of the AI service to use for generating outputs.
Specifies the URL of the AI service to use for generating outputs.
Specifies the URL of the AI service to use for generating outputs.
Specifies if the output rating should be displayed on the output card. > Note: This property is deprecated. Use the outputActions configuration instead.
[Obsolete("This option is obsolete since Q3 2025 and will be removed in future releases")]
public AIPromptBuilder ShowOutputRating(bool value)
The value that configures the showoutputrating.
Returns:Controls whether the subtitle of the card in the output view displays a tooltip containing the full content of the subtitle, which is the prompt used to generate the output.
Controls whether the subtitle of the card in the output view displays a tooltip containing the full content of the subtitle, which is the prompt used to generate the output.
public AIPromptBuilder ShowOutputSubtitleTooltip(bool value)
The value that configures the showoutputsubtitletooltip.
Returns: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.
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.
public AIPromptBuilder SpeechToText(Action<AIPromptSpeechToTextSettingsBuilder> configurator)
The action that configures the speechtotext.
Returns: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.
public AIPromptBuilder SpeechToText(bool enabled)
Enables or disables the speechtotext option.
Returns:An array of toolbar items to display in the header Toolbar. They will be rendered after the items generated from the configurations of the views.
public AIPromptBuilder ToolbarItems(Action<AIPromptToolbarItemFactory> configurator)
The action that configures the toolbaritems.
Returns:An array of view configurations.
public AIPromptBuilder Views(Action<AIPromptViewFactory> configurator)
The action that configures the views.
Returns: