AIPromptBuilder
Defines the fluent API for configuring the Kendo UI AIPrompt
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class AIPromptBuilder : WidgetBuilderBase<AIPrompt, AIPromptBuilder>, IHtmlContent
Inheritance: objectHelperResultWidgetBuilderBase<AIPrompt, AIPromptBuilder>AIPromptBuilder
Implements:
Inherited Members
Constructors
Initializes a new instance of the AIPromptBuilder class.
Methods
Specifies the index of the active view or the name of the view.
public AIPromptBuilder ActiveView(object value)
The value for ActiveView
Returns:Returns the current AIPromptBuilder instance.
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 for EncodedPromptOutputs
Returns:Returns the current AIPromptBuilder instance.
Configures the client-side events.
public AIPromptBuilder Events(Action<AIPromptEventBuilder> configurator)
The client events action.
Returns:Returns the current AIPromptBuilder instance.
The text messages displayed in the component. Use this option to customize or localize the messages.
public AIPromptBuilder Messages(Action<AIPromptMessagesSettingsBuilder> configurator)
The AIPromptMessagesSettingsBuilder for the messages setting.
Returns:Returns the current instance of AIPromptBuilder .
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 for OutputTemplate
Returns:Returns the current AIPromptBuilder instance.
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:Returns the current AIPromptBuilder instance.
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 templateHandler)
The handler that returs the template for OutputTemplate
Returns:Returns the current AIPromptBuilder instance.
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 templateId)
The ID of the template element for OutputTemplate
Returns:Returns the current AIPromptBuilder instance.
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(IHtmlContent templateView)
The view that contains the template for OutputTemplate
Returns:Returns the current AIPromptBuilder instance.
An array of prompt outputs to display in the prompt view.
public AIPromptBuilder PromptOutputs(Action<AIPromptPromptOutputFactory> configurator)
The AIPromptPromptOutputFactory for the promptoutputs setting.
Returns:Returns the current instance of AIPromptBuilder .
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 for PromptSuggestionItemTemplate
Returns:Returns the current AIPromptBuilder instance.
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:Returns the current AIPromptBuilder instance.
The template of the prompt suggestion item. It can be a string, a function or a Kendo Template.
public AIPromptBuilder PromptSuggestionItemTemplateHandler(string templateHandler)
The handler that returs the template for PromptSuggestionItemTemplate
Returns:Returns the current AIPromptBuilder instance.
The template of the prompt suggestion item. It can be a string, a function or a Kendo Template.
public AIPromptBuilder PromptSuggestionItemTemplateId(string templateId)
The ID of the template element for PromptSuggestionItemTemplate
Returns:Returns the current AIPromptBuilder instance.
The template of the prompt suggestion item. It can be a string, a function or a Kendo Template.
public AIPromptBuilder PromptSuggestionItemTemplateView(IHtmlContent templateView)
The view that contains the template for PromptSuggestionItemTemplate
Returns:Returns the current AIPromptBuilder instance.
Sets the PromptSuggestions collection
public AIPromptBuilder PromptSuggestions(ICollection<string> value)
The collection
Returns:Returns the current AIPromptBuilder instance.
Adds a suggestion to the PromptSuggestions collection.
public AIPromptBuilder PromptSuggestions(string value)
The suggestion
Returns:Returns the current AIPromptBuilder instance.
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 AIPromptPromptTextAreaSettingsBuilder for the prompttextarea setting.
Returns:Returns the current instance of AIPromptBuilder .
The URL of the AI service to use for generating outputs.
public AIPromptBuilder Service(Action<AIPromptServiceSettingsBuilder> configurator)
The AIPromptServiceSettingsBuilder for the service setting.
Returns:Returns the current instance of AIPromptBuilder .
The URL of the AI service to use for generating outputs.
public AIPromptBuilder Service(string actionName, string controllerName, object routeValues)
The action name of the service setting.
controllerNamestringThe controller name of the service setting.
routeValuesobjectThe route values of the service setting.
Returns:Returns the current instance of AIPromptBuilder .
The URL of the AI service to use for generating outputs.
public AIPromptBuilder Service(string actionName, string controllerName, RouteValueDictionary routeValues)
The action name of the service setting.
controllerNamestringThe controller name of the service setting.
routeValuesRouteValueDictionaryThe route values of the service setting.
Returns:Returns the current instance of AIPromptBuilder .
The URL of the AI service to use for generating outputs.
public AIPromptBuilder Service(string actionName, string controllerName)
The action name of the service setting.
controllerNamestringThe controller name of the service setting.
Returns:Returns the current instance of AIPromptBuilder .
The URL of the AI service to use for generating outputs.
public AIPromptBuilder Service(string value)
The url of the service setting.
Returns:Returns the current instance of AIPromptBuilder .
Specifies if the output rating should be displayed on the output card. > Note: This property is deprecated. Use the outputActions configuration instead.
public AIPromptBuilder ShowOutputRating(bool value)
The value for ShowOutputRating
Returns:Returns the current AIPromptBuilder instance.
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()
Returns the current AIPromptBuilder instance.
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 for ShowOutputSubtitleTooltip
Returns:Returns the current AIPromptBuilder instance.
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()
Returns the current instance of AIPromptSpeechToTextSettingsBuilder .
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 AIPromptSpeechToTextSettingsBuilder for the speechtotext setting.
Returns:Returns the current instance of AIPromptBuilder .
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:Returns the current instance of AIPromptSpeechToTextSettingsBuilder .
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 AIPromptToolbarItemFactory for the toolbaritems setting.
Returns:Returns the current instance of AIPromptBuilder .
An array of view configurations.
public AIPromptBuilder Views(Action<AIPromptViewFactory> configurator)
The AIPromptViewFactory for the views setting.
Returns:Returns the current instance of AIPromptBuilder .