New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent API for configuring the Kendo InlineAIPrompt for ASP.NET MVC.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class InlineAIPromptBuilder : WidgetBuilderBase<InlineAIPrompt, InlineAIPromptBuilder>, IHtmlString

Inheritance: objectWidgetBuilderBase<InlineAIPrompt, InlineAIPromptBuilder>InlineAIPromptBuilder

Implements: IHtmlString

Inherited Members WidgetBuilderBase<InlineAIPrompt, InlineAIPromptBuilder>.ToComponent()WidgetBuilderBase<InlineAIPrompt, InlineAIPromptBuilder>.Name(string)WidgetBuilderBase<InlineAIPrompt, InlineAIPromptBuilder>.Deferred(bool)WidgetBuilderBase<InlineAIPrompt, InlineAIPromptBuilder>.ModelMetadata(ModelMetadata)WidgetBuilderBase<InlineAIPrompt, InlineAIPromptBuilder>.HtmlAttributes(object)WidgetBuilderBase<InlineAIPrompt, InlineAIPromptBuilder>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<InlineAIPrompt, InlineAIPromptBuilder>.AsModule(bool)WidgetBuilderBase<InlineAIPrompt, InlineAIPromptBuilder>.Render()WidgetBuilderBase<InlineAIPrompt, InlineAIPromptBuilder>.ScriptAttributes(object, bool)WidgetBuilderBase<InlineAIPrompt, InlineAIPromptBuilder>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<InlineAIPrompt, InlineAIPromptBuilder>.ToHtmlString()WidgetBuilderBase<InlineAIPrompt, InlineAIPromptBuilder>.ToClientTemplate()WidgetBuilderBase<InlineAIPrompt, InlineAIPromptBuilder>.ToString()WidgetBuilderBase<InlineAIPrompt, InlineAIPromptBuilder>.Componentobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the InlineAIPrompt class.

C#
public InlineAIPromptBuilder(InlineAIPrompt component)
Parameters:componentInlineAIPrompt

The component.

Methods

Defines the commands for the AI tool. The commands are displayed in the AI tool dropdown.

C#
public InlineAIPromptBuilder Commands(Action<EditorAISettingsCommandFactory> configurator)
Parameters:configuratorAction<EditorAISettingsCommandFactory>

The configurator for the commands setting.

Returns:

InlineAIPromptBuilder

The InlineAIPromptBuilder instance for fluent API chaining.

Specifies whether the underlying TextArea widget will be disabled or not.

C#
public InlineAIPromptBuilder Enable(bool value)
Parameters:valuebool

The value that configures the enable.

Returns:

InlineAIPromptBuilder

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.

C#
public InlineAIPromptBuilder EncodedPromptOutputs(bool value)
Parameters:valuebool

The value that configures the encodedpromptoutputs.

Returns:

InlineAIPromptBuilder

Configures the client-side events.

C#
public InlineAIPromptBuilder Events(Action<InlineAIPromptEventBuilder> configurator)
Parameters:configuratorAction<InlineAIPromptEventBuilder>

The client events action.

Returns:

InlineAIPromptBuilder

Example:
C#
@(Html.Kendo().InlineAIPrompt()
.Name("InlineAIPrompt")
.Events(events =&gt; events
.PromptRequest("onPromptRequest")
)
)

Sets the widget in a streaming mode.

C#
public InlineAIPromptBuilder IsStreaming(bool value)
Parameters:valuebool

The value that configures the isstreaming.

Returns:

InlineAIPromptBuilder

The text messages displayed in the prompt send and stop output retrieval buttons.

C#
public InlineAIPromptBuilder Messages(Action<InlineAIPromptMessagesSettingsBuilder> configurator)
Parameters:configuratorAction<InlineAIPromptMessagesSettingsBuilder>

The action that configures the messages.

Returns:

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.

C#
public InlineAIPromptBuilder OutputActions(Action<InlineAIPromptOutputActionFactory> configurator)
Parameters:configuratorAction<InlineAIPromptOutputActionFactory>

The InlineAIPromptOutputActionFactory for the outputactions setting.

Returns:

InlineAIPromptBuilder

Returns the current instance of InlineAIPromptBuilder .

Specifies the placeholder text for the underlying TextArea widget.

C#
public InlineAIPromptBuilder Placeholder(string value)
Parameters:valuestring

The value that configures the placeholder.

Returns:

InlineAIPromptBuilder

The options that will be used for the popup initialization. For more details about the available options refer to Popup documentation.

C#
public InlineAIPromptBuilder Popup(Action<InlineAIPromptPopupSettingsBuilder> configurator)
Parameters:configuratorAction<InlineAIPromptPopupSettingsBuilder>

The action that configures the popup.

Returns:

InlineAIPromptBuilder

Specifies whether the underlying TextArea widget will be readonly or not.

C#
public InlineAIPromptBuilder Readonly(bool value)
Parameters:valuebool

The value that configures the readonly.

Returns:

InlineAIPromptBuilder

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.

C#
public InlineAIPromptBuilder ResponseTemplate(string value)
Parameters:valuestring

The value that configures the responsetemplate.

Returns:

InlineAIPromptBuilder

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.

C#
public InlineAIPromptBuilder ResponseTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the responsetemplate.

Returns:

InlineAIPromptBuilder

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.

C#
public InlineAIPromptBuilder ResponseTemplateHandler(string value)
Parameters:valuestring

The value that configures the responsetemplate.

Returns:

InlineAIPromptBuilder

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.

C#
public InlineAIPromptBuilder ResponseTemplateId(string value)
Parameters:valuestring

The value that configures the responsetemplate.

Returns:

InlineAIPromptBuilder

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.

C#
public InlineAIPromptBuilder ResponseTemplateView(MvcHtmlString value)
Parameters:valueMvcHtmlString

The value that configures the responsetemplate.

Returns:

InlineAIPromptBuilder

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

C#
public InlineAIPromptBuilder Service(Action<AIPromptServiceSettingsBuilder> configurator)
Parameters:configuratorAction<AIPromptServiceSettingsBuilder>

The configurator for the service setting.

Returns:

InlineAIPromptBuilder

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.

C#
public InlineAIPromptBuilder SpeechToText()
Returns:

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.

C#
public InlineAIPromptBuilder SpeechToText(Action<InlineAIPromptSpeechToTextSettingsBuilder> configurator)
Parameters:configuratorAction<InlineAIPromptSpeechToTextSettingsBuilder>

The action that configures the speechtotext.

Returns:

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.

C#
public InlineAIPromptBuilder SpeechToText(bool enabled)
Parameters:enabledbool

Enables or disables the speechtotext option.

Returns:

InlineAIPromptBuilder

Sets the systemPrompt's format which will be send to the specified AI Service. Exposes both a context and prompt metadata.

C#
public InlineAIPromptBuilder SystemPrompt(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The value that configures the systemprompt action.

Returns:

InlineAIPromptBuilder

Sets the systemPrompt's format which will be send to the specified AI Service. Exposes both a context and prompt metadata.

C#
public InlineAIPromptBuilder SystemPrompt(string handler)
Parameters:handlerstring

The value that configures the systemprompt action.

Returns:

InlineAIPromptBuilder