InlineAIPromptBuilder
Methods
Enable(System.Boolean)
Specifies whether the underlying TextArea widget will be disabled or not.
Parameters
value - System.Boolean
The value that configures the enable.
Readonly(System.Boolean)
Specifies whether the underlying TextArea widget will be readonly or not.
Parameters
value - System.Boolean
The value that configures the readonly.
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 that configures the encodedpromptoutputs.
Placeholder(System.String)
Specifies the placeholder text for the underlying TextArea widget.
Parameters
value - System.String
The value that configures the placeholder.
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 action that configures the popup.
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.
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.
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 action that configures the speechtotext.
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 that configures the responsetemplate.
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
value - System.String
The value that configures the responsetemplate.
ResponseTemplateView(System.Web.Mvc.MvcHtmlString)
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.Web.Mvc.MvcHtmlString
The value that configures the responsetemplate.
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
value - System.String
The value that configures the responsetemplate.
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.
IsStreaming(System.Boolean)
Sets the widget in a streaming mode.
Parameters
value - System.Boolean
The value that configures the isstreaming.
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 value that configures the systemprompt action.
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 value that configures the systemprompt action.
Messages(System.Action)
The text messages displayed in the prompt send and stop output retrieval buttons.
Parameters
configurator - System.Action<InlineAIPromptMessagesSettingsBuilder>
The action that configures the messages.
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<InlineAIPromptEventBuilder>
The client events action.
Example
@(Html.Kendo().InlineAIPrompt()
.Name("InlineAIPrompt")
.Events(events => events
.PromptRequest("onPromptRequest")
)
)
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 .
ToComponent()
Returns the internal view component.
Name(System.String)
Sets the name of the component.
Parameters
componentName - System.String
The name of the component.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Deferred(System.Boolean)
Suppress initialization script rendering. Note that this options should be used in conjunction with
Parameters
deferred - System.Boolean
ModelMetadata(System.Web.Mvc.ModelMetadata)
Uses the Metadata of the Model.
Parameters
modelMetadata - System.Web.Mvc.ModelMetadata
The metadata set for the Model
HtmlAttributes(System.Object)
Sets the HTML attributes.
Parameters
attributes - System.Object
The HTML attributes.
HtmlAttributes(System.Collections.Generic.IDictionary)
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
AsModule(System.Boolean)
Specifies whether the initialization script of the component will be rendered as a JavaScript module.
Parameters
value - System.Boolean
Render()
Renders the component.
Example
@(@Page Inherits="System.Web.Mvc.ViewPage<IEnumerable<Product>>" )
@( Html.Kendo().Grid(Model)
.Name("grid")
.DetailTemplate(product => {
)
Product Details:
<div>Product Name: @( product.ProductName )</div>
<div>Units In Stock: @( product.UnitsInStock )</div>
@(
})
.Render();
)
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.
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.