AIPromptBuilder
Properties
WriteAction - Func
Methods
PromptSuggestions(System.String)
Adds a suggestion to the PromptSuggestions collection.
Parameters
value - System.String
The suggestion
RETURNS
Returns the current AIPromptBuilder instance.
PromptSuggestions(System.Collections.Generic.ICollection)
Sets the PromptSuggestions collection
Parameters
value - System.Collections.Generic.ICollection<String>
The collection
RETURNS
Returns the current AIPromptBuilder instance.
ActiveView(System.Object)
Specifies the index of the active view or the name of the view.
Parameters
value - System.Object
The value for ActiveView
RETURNS
Returns the current AIPromptBuilder instance.
Service(System.String)
The URL of the AI service to use for generating outputs.
Parameters
value - System.String
The url of the service setting.
RETURNS
Returns the current instance of AIPromptBuilder .
Service(System.String,System.String)
The URL of the AI service to use for generating outputs.
Parameters
actionName - System.String
The action name of the service setting.
controllerName - System.String
The controller name of the service setting.
RETURNS
Returns the current instance of AIPromptBuilder .
Service(System.String,System.String,System.Object)
The URL of the AI service to use for generating outputs.
Parameters
actionName - System.String
The action name of the service setting.
controllerName - System.String
The controller name of the service setting.
routeValues - System.Object
The route values of the service setting.
RETURNS
Returns the current instance of AIPromptBuilder .
Service(System.String,System.String,Microsoft.AspNetCore.Routing.RouteValueDictionary)
The URL of the AI service to use for generating outputs.
Parameters
actionName - System.String
The action name of the service setting.
controllerName - System.String
The controller name of the service setting.
routeValues - Microsoft.AspNetCore.Routing.RouteValueDictionary
The route values of the service setting.
RETURNS
Returns the current instance of AIPromptBuilder .
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<AIPromptOutputActionFactory>
The configurator for the outputactions setting.
RETURNS
Returns the current instance of AIPromptBuilder .
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 AIPromptBuilder instance.
PromptOutputs(System.Action)
An array of prompt outputs to display in the prompt view.
Parameters
configurator - System.Action<AIPromptPromptOutputFactory>
The configurator for the promptoutputs setting.
RETURNS
Returns the current instance of AIPromptBuilder .
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<AIPromptSpeechToTextSettingsBuilder>
The configurator for the speechtotext setting.
RETURNS
Returns the current instance of AIPromptBuilder .
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 AIPromptBuilder .
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 AIPromptSpeechToTextSettingsBuilder .
PromptTextArea(System.Action)
Configuration options for the Kendo UI TextArea component used in the prompt view. Only specific properties from the Kendo UI TextArea are supported.
Parameters
configurator - System.Action<AIPromptPromptTextAreaSettingsBuilder>
The configurator for the prompttextarea setting.
RETURNS
Returns the current instance of AIPromptBuilder .
OutputTemplate(System.String)
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.
Parameters
value - System.String
The value for OutputTemplate
RETURNS
Returns the current AIPromptBuilder instance.
OutputTemplateId(System.String)
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.
Parameters
templateId - System.String
The ID of the template element for OutputTemplate
RETURNS
Returns the current AIPromptBuilder instance.
OutputTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)
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.
Parameters
templateView - Microsoft.AspNetCore.Html.IHtmlContent
The view that contains the template for OutputTemplate
RETURNS
Returns the current AIPromptBuilder instance.
OutputTemplateHandler(System.String)
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.
Parameters
templateHandler - System.String
The handler that returs the template for OutputTemplate
RETURNS
Returns the current AIPromptBuilder instance.
OutputTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
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.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the outputtemplate.
RETURNS
Returns the current AIPromptBuilder instance.
PromptSuggestionItemTemplate(System.String)
The template of the prompt suggestion item. It can be a string, a function or a Kendo Template.
Parameters
value - System.String
The value for PromptSuggestionItemTemplate
RETURNS
Returns the current AIPromptBuilder instance.
PromptSuggestionItemTemplateId(System.String)
The template of the prompt suggestion item. It can be a string, a function or a Kendo Template.
Parameters
templateId - System.String
The ID of the template element for PromptSuggestionItemTemplate
RETURNS
Returns the current AIPromptBuilder instance.
PromptSuggestionItemTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)
The template of the prompt suggestion item. It can be a string, a function or a Kendo Template.
Parameters
templateView - Microsoft.AspNetCore.Html.IHtmlContent
The view that contains the template for PromptSuggestionItemTemplate
RETURNS
Returns the current AIPromptBuilder instance.
PromptSuggestionItemTemplateHandler(System.String)
The template of the prompt suggestion item. It can be a string, a function or a Kendo Template.
Parameters
templateHandler - System.String
The handler that returs the template for PromptSuggestionItemTemplate
RETURNS
Returns the current AIPromptBuilder instance.
PromptSuggestionItemTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template of the prompt suggestion item. It can be a string, a function or a Kendo Template.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the promptsuggestionitemtemplate.
RETURNS
Returns the current AIPromptBuilder instance.
ToolbarItems(System.Action)
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.
Parameters
configurator - System.Action<AIPromptToolbarItemFactory>
The configurator for the toolbaritems setting.
RETURNS
Returns the current instance of AIPromptBuilder .
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
Returns the current instance of AIPromptBuilder .
ShowOutputSubtitleTooltip(System.Boolean)
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.
Parameters
value - System.Boolean
The value for ShowOutputSubtitleTooltip
RETURNS
Returns the current AIPromptBuilder instance.
ShowOutputRating(System.Boolean)
Specifies if the output rating should be displayed on the output card.
Parameters
value - System.Boolean
The value for ShowOutputRating
RETURNS
Returns the current AIPromptBuilder instance.
ShowOutputSubtitleTooltip()
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.
RETURNS
Returns the current AIPromptBuilder instance.
Views(System.Action)
An array of view configurations.
Parameters
configurator - System.Action<AIPromptViewFactory>
The configurator for the views setting.
RETURNS
Returns the current instance of AIPromptBuilder .
Messages(System.Action)
The text messages displayed in the component. Use this option to customize or localize the messages.
Parameters
configurator - System.Action<AIPromptMessagesSettingsBuilder>
The configurator for the messages setting.
RETURNS
Returns the current instance of AIPromptBuilder .
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<AIPromptEventBuilder>
The client events action.
RETURNS
Returns the current AIPromptBuilder instance.
Example
@(Html.Kendo().AIPrompt()
.Name("AIPrompt")
.Events(events => events
.CommandExecute("onCommandExecute")
)
)
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.