AIPromptBuilder

Methods

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.

PromptOutputs(System.Action)

An array of prompt outputs to display in the prompt view.

Parameters

configurator - System.Action<AIPromptPromptOutputFactory>

The action that configures the promptoutputs.

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<AIPromptSpeechToTextSettingsBuilder>

The action that configures the speechtotext.

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 action that configures the prompttextarea.

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 that configures the outputtemplate.

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

value - System.String

The value that configures the outputtemplate.

OutputTemplateView(System.Web.Mvc.MvcHtmlString)

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.Web.Mvc.MvcHtmlString

The value that configures the outputtemplate.

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

value - System.String

The value that configures the outputtemplate.

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.

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 that configures the promptsuggestionitemtemplate.

PromptSuggestionItemTemplateId(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 that configures the promptsuggestionitemtemplate.

PromptSuggestionItemTemplateView(System.Web.Mvc.MvcHtmlString)

The template of the prompt suggestion item. It can be a string, a function or a Kendo Template.

Parameters

value - System.Web.Mvc.MvcHtmlString

The value that configures the promptsuggestionitemtemplate.

PromptSuggestionItemTemplateHandler(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 that configures the promptsuggestionitemtemplate.

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.

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 action that configures the toolbaritems.

Service(System.Action)

The URL of the AI service to use for generating outputs.

Parameters

configurator - System.Action<AIPromptServiceSettingsBuilder>

The action that configures the service.

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 that configures the showoutputsubtitletooltip.

ShowOutputRating(System.Boolean)

Specifies if the output rating should be displayed on the output card.

Parameters

value - System.Boolean

The value that configures the showoutputrating.

Views(System.Action)

An array of view configurations.

Parameters

configurator - System.Action<AIPromptViewFactory>

The action that configures the views.

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 action that configures the messages.

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.

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<AIPromptEventBuilder>

The client events action.

Example

Razor
 
            @(Html.Kendo().AIPrompt()
                        .Name("AIPrompt")
                        .Events(events => events
                            .CommandExecute("onCommandExecute")
                        )
            )
             

PromptSuggestions(System.String)

Adds a suggestion to the PromptSuggestions collection.

Parameters

value - System.String

The suggestion

PromptSuggestions(System.Collections.Generic.ICollection)

Sets the PromptSuggestions collection

Parameters

value - System.Collections.Generic.ICollection<String>

The collection

ActiveView(System.Object)

Specifies the index of the active view or the name of the view.

Parameters

value - System.Object

The value that configures the activeview.

Service(System.String)

Specifies the URL of the AI service to use for generating outputs.

Parameters

value - System.String

The url.

Service(System.String,System.String)

Specifies the URL of the AI service to use for generating outputs.

Parameters

actionName - System.String

The name of the action.

controllerName - System.String

The name of the controller.

Service(System.String,System.String,System.Object)

Specifies the URL of the AI service to use for generating outputs.

Parameters

actionName - System.String

The name of tha action.

controllerName - System.String

The name of the controller.

routeValues - System.Object

The route values.

Service(System.String,System.String,System.Web.Routing.RouteValueDictionary)

Specifies the URL of the AI service to use for generating outputs.

Parameters

actionName - System.String

The name of tha action.

controllerName - System.String

The name of the controller.

routeValues - System.Web.Routing.RouteValueDictionary

The route values.

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 .

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

Razor
 
            @(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

Razor
 
            @(@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.

ToHtmlString()

ToClientTemplate()

In this article
MethodsEncodedPromptOutputs(System.Boolean)PromptOutputs(System.Action)SpeechToText()SpeechToText(System.Boolean)SpeechToText(System.Action)PromptTextArea(System.Action)OutputTemplate(System.String)OutputTemplateId(System.String)OutputTemplateView(System.Web.Mvc.MvcHtmlString)OutputTemplateHandler(System.String)OutputTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)PromptSuggestionItemTemplate(System.String)PromptSuggestionItemTemplateId(System.String)PromptSuggestionItemTemplateView(System.Web.Mvc.MvcHtmlString)PromptSuggestionItemTemplateHandler(System.String)PromptSuggestionItemTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)ToolbarItems(System.Action)Service(System.Action)ShowOutputSubtitleTooltip(System.Boolean)ShowOutputRating(System.Boolean)Views(System.Action)Messages(System.Action)ShowOutputSubtitleTooltip()Events(System.Action)PromptSuggestions(System.String)PromptSuggestions(System.Collections.Generic.ICollection)ActiveView(System.Object)Service(System.String)Service(System.String,System.String)Service(System.String,System.String,System.Object)Service(System.String,System.String,System.Web.Routing.RouteValueDictionary)OutputActions(System.Action)ToComponent()Name(System.String)Deferred(System.Boolean)ModelMetadata(System.Web.Mvc.ModelMetadata)HtmlAttributes(System.Object)HtmlAttributes(System.Collections.Generic.IDictionary)AsModule(System.Boolean)Render()ScriptAttributes(System.Object,System.Boolean)ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)ToHtmlString()ToClientTemplate()
Not finding the help you need?
Contact Support