InlineAIPromptBuilder
Properties
WriteAction - Func
Methods
Commands(System.Action)
Defines the commands for the AI tool. The commands are displayed in the AI tool dropdown.
Parameters
configurator - System.Action<EditorAISettingsCommandFactory>
The configurator for the commands setting.
RETURNS
The InlineAIPromptBuilder instance for fluent API chaining.
Service(System.Action)
The URL of the AI service to use for generating outputs.
Parameters
configurator - System.Action<AIPromptServiceSettingsBuilder>
The configurator for the service setting.
RETURNS
The EditorAISettingsBuilder instance for fluent API chaining.
OutputActions(System.Action)
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.
Parameters
configurator - System.Action<InlineAIPromptOutputActionFactory>
The configurator for the outputactions setting.
RETURNS
Returns the current instance of InlineAIPromptBuilder .
Enable(System.Boolean)
Specifies whether the underlying TextArea widget will be disabled or not.
Parameters
value - System.Boolean
The value for Enable
RETURNS
Returns the current InlineAIPromptBuilder instance.
Readonly(System.Boolean)
Specifies whether the underlying TextArea widget will be readonly or not.
Parameters
value - System.Boolean
The value for Readonly
RETURNS
Returns the current InlineAIPromptBuilder instance.
Readonly()
Specifies whether the underlying TextArea widget will be readonly or not.
RETURNS
Returns the current InlineAIPromptBuilder instance.
EncodedPromptOutputs(System.Boolean)
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.
Parameters
value - System.Boolean
The value for EncodedPromptOutputs
RETURNS
Returns the current InlineAIPromptBuilder instance.
Placeholder(System.String)
Specifies the placeholder text for the underlying TextArea widget.
Parameters
value - System.String
The value for Placeholder
RETURNS
Returns the current InlineAIPromptBuilder instance.
Popup(System.Action)
The options that will be used for the popup initialization. For more details about the available options refer to Popup documentation.
Parameters
configurator - System.Action<InlineAIPromptPopupSettingsBuilder>
The configurator for the popup setting.
RETURNS
Returns the current instance of InlineAIPromptBuilder .
SpeechToText(System.Action)
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.
Parameters
configurator - System.Action<InlineAIPromptSpeechToTextSettingsBuilder>
The configurator for the speechtotext setting.
RETURNS
Returns the current instance of InlineAIPromptBuilder .
SpeechToText()
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.
RETURNS
Returns the current instance of InlineAIPromptBuilder .
SpeechToText(System.Boolean)
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.
Parameters
enabled - System.Boolean
Enables or disables the speechtotext option.
RETURNS
Returns the current instance of InlineAIPromptSpeechToTextSettingsBuilder .
ResponseTemplate(System.String)
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.
Parameters
value - System.String
The value for ResponseTemplate
RETURNS
Returns the current InlineAIPromptBuilder instance.
ResponseTemplateId(System.String)
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.
Parameters
templateId - System.String
The ID of the template element for ResponseTemplate
RETURNS
Returns the current InlineAIPromptBuilder instance.
ResponseTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)
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.
Parameters
templateView - Microsoft.AspNetCore.Html.IHtmlContent
The view that contains the template for ResponseTemplate
RETURNS
Returns the current InlineAIPromptBuilder instance.
ResponseTemplateHandler(System.String)
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.
Parameters
templateHandler - System.String
The handler that returs the template for ResponseTemplate
RETURNS
Returns the current InlineAIPromptBuilder instance.
ResponseTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
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.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the responsetemplate.
RETURNS
Returns the current InlineAIPromptBuilder instance.
IsStreaming(System.Boolean)
Sets the widget in a streaming mode.
Parameters
value - System.Boolean
The value for IsStreaming
RETURNS
Returns the current InlineAIPromptBuilder instance.
IsStreaming()
Sets the widget in a streaming mode.
RETURNS
Returns the current InlineAIPromptBuilder instance.
SystemPrompt(System.String)
Sets the systemPrompt's format which will be send to the specified AI Service. Exposes both a context and prompt metadata.
Parameters
handler - System.String
The name of the JavaScript function that will be evaluated.
RETURNS
Returns the current InlineAIPromptBuilder instance.
SystemPrompt(System.Func)
Sets the systemPrompt's format which will be send to the specified AI Service. Exposes both a context and prompt metadata.
Parameters
handler - System.Func<Object,Object>
The handler code wrapped in a text tag.
RETURNS
Returns the current InlineAIPromptBuilder instance.
Messages(System.Action)
The text messages displayed in the prompt send and stop output retrieval buttons.
Parameters
configurator - System.Action<InlineAIPromptMessagesSettingsBuilder>
The configurator for the messages setting.
RETURNS
Returns the current instance of InlineAIPromptBuilder .
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<InlineAIPromptEventBuilder>
The client events action.
RETURNS
Returns the current InlineAIPromptBuilder instance.
Example
@(Html.Kendo().InlineAIPrompt()
.Name("InlineAIPrompt")
.Events(events => events
.PromptRequest("onPromptRequest")
)
)
ToComponent()
Returns the internal view component.
RETURNS
The instance that represents the component.
Expression(System.String)
Sets the name of the component.
Parameters
modelExpression - System.String
RETURNS
Returns the current instance.
Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)
Sets the name of the component.
Parameters
modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer
RETURNS
Returns the current instance.
Name(System.String)
Sets the name of the component.
Parameters
componentName - System.String
The name.
RETURNS
Returns the current instance.
Deferred(System.Boolean)
Suppress initialization script rendering. Note that this options should be used in conjunction with
Parameters
deferred - System.Boolean
RETURNS
Returns a DeferredWidgetBuilder instance.
HtmlAttributes(System.Object)
Sets the HTML attributes.
Parameters
attributes - System.Object
The HTML attributes.
RETURNS
Returns the current instance.
HtmlAttributes(System.Collections.Generic.IDictionary)
Sets the HTML attributes.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The HTML attributes.
RETURNS
Returns the current instance.
ScriptAttributes(System.Object,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Object
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
RETURNS
Returns the current instance.
ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
RETURNS
Returns the current instance.
Render()
Renders the component in place.
ToHtmlString()
Returns the HTML representation of the component.
WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)
Parameters
writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder
ToClientTemplate()
Returns the client template for the component.
AsModule(System.Boolean)
Specifies whether the initialization script of the component will be rendered as a JavaScript module.
Parameters
value - System.Boolean
RETURNS
Returns the current instance.