Defines the fluent API for configuring the Kendo UI InlineAIPrompt
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class InlineAIPromptBuilder : WidgetBuilderBase<InlineAIPrompt, InlineAIPromptBuilder>, IHtmlContent
Inheritance: objectHelperResultWidgetBuilderBase<InlineAIPrompt, InlineAIPromptBuilder>InlineAIPromptBuilder
Implements:
Inherited Members
Constructors
Initializes a new instance of the InlineAIPromptBuilder class.
Methods
Defines the commands for the AI tool. The commands are displayed in the AI tool dropdown.
public InlineAIPromptBuilder Commands(Action<EditorAISettingsCommandFactory> configurator)
The configurator for the commands setting.
Returns:The InlineAIPromptBuilder instance for fluent API chaining.
Specifies whether the underlying TextArea widget will be disabled or not.
public InlineAIPromptBuilder Enable(bool value)
The value for Enable
Returns:Returns the current InlineAIPromptBuilder 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 InlineAIPromptBuilder EncodedPromptOutputs(bool value)
The value for EncodedPromptOutputs
Returns:Returns the current InlineAIPromptBuilder instance.
Configures the client-side events.
public InlineAIPromptBuilder Events(Action<InlineAIPromptEventBuilder> configurator)
The client events action.
Returns:Returns the current InlineAIPromptBuilder instance.
Sets the widget in a streaming mode.
public InlineAIPromptBuilder IsStreaming()
Returns the current InlineAIPromptBuilder instance.
Sets the widget in a streaming mode.
public InlineAIPromptBuilder IsStreaming(bool value)
The value for IsStreaming
Returns:Returns the current InlineAIPromptBuilder instance.
The text messages displayed in the prompt send and stop output retrieval buttons.
public InlineAIPromptBuilder Messages(Action<InlineAIPromptMessagesSettingsBuilder> configurator)
The InlineAIPromptMessagesSettingsBuilder for the messages setting.
Returns:Returns the current instance of InlineAIPromptBuilder .
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 InlineAIPromptBuilder OutputActions(Action<InlineAIPromptOutputActionFactory> configurator)
The InlineAIPromptOutputActionFactory for the outputactions setting.
Returns:Returns the current instance of InlineAIPromptBuilder .
Specifies the placeholder text for the underlying TextArea widget.
public InlineAIPromptBuilder Placeholder(string value)
The value for Placeholder
Returns:Returns the current InlineAIPromptBuilder instance.
The options that will be used for the popup initialization. For more details about the available options refer to Popup documentation.
public InlineAIPromptBuilder Popup(Action<InlineAIPromptPopupSettingsBuilder> configurator)
The InlineAIPromptPopupSettingsBuilder for the popup setting.
Returns:Returns the current instance of InlineAIPromptBuilder .
Specifies whether the underlying TextArea widget will be readonly or not.
public InlineAIPromptBuilder Readonly()
Returns the current InlineAIPromptBuilder instance.
Specifies whether the underlying TextArea widget will be readonly or not.
public InlineAIPromptBuilder Readonly(bool value)
The value for Readonly
Returns:Returns the current InlineAIPromptBuilder instance.
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.
public InlineAIPromptBuilder ResponseTemplate(string value)
The value for ResponseTemplate
Returns:Returns the current InlineAIPromptBuilder instance.
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.
public InlineAIPromptBuilder ResponseTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the responsetemplate.
Returns:Returns the current InlineAIPromptBuilder instance.
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.
public InlineAIPromptBuilder ResponseTemplateHandler(string templateHandler)
The handler that returs the template for ResponseTemplate
Returns:Returns the current InlineAIPromptBuilder instance.
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.
public InlineAIPromptBuilder ResponseTemplateId(string templateId)
The ID of the template element for ResponseTemplate
Returns:Returns the current InlineAIPromptBuilder instance.
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.
public InlineAIPromptBuilder ResponseTemplateView(IHtmlContent templateView)
The view that contains the template for ResponseTemplate
Returns:Returns the current InlineAIPromptBuilder instance.
The URL of the AI service to use for generating outputs.
public InlineAIPromptBuilder Service(Action<AIPromptServiceSettingsBuilder> configurator)
The configurator for the service setting.
Returns:The EditorAISettingsBuilder instance for fluent API chaining.
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 InlineAIPromptBuilder SpeechToText()
Returns the current instance of InlineAIPromptSpeechToTextSettingsBuilder .
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 InlineAIPromptBuilder SpeechToText(Action<InlineAIPromptSpeechToTextSettingsBuilder> configurator)
The InlineAIPromptSpeechToTextSettingsBuilder for the speechtotext setting.
Returns:Returns the current instance of InlineAIPromptBuilder .
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 InlineAIPromptBuilder SpeechToText(bool enabled)
Enables or disables the speechtotext option.
Returns:Returns the current instance of InlineAIPromptSpeechToTextSettingsBuilder .
Sets the systemPrompt's format which will be send to the specified AI Service. Exposes both a context and prompt metadata.
public InlineAIPromptBuilder SystemPrompt(Func<object, object> handler)
The handler code wrapped in a text tag.
Returns:Returns the current InlineAIPromptBuilder instance.
Sets the systemPrompt's format which will be send to the specified AI Service. Exposes both a context and prompt metadata.
public InlineAIPromptBuilder SystemPrompt(string handler)
The name of the JavaScript function that will be evaluated.
Returns:Returns the current InlineAIPromptBuilder instance.