# 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](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/editoraisettingscommandfactory)>

The configurator for the commands setting.

#### RETURNS

The [InlineAIPromptBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/aipromptservicesettingsbuilder)>

The configurator for the service setting.

#### RETURNS

The [EditorAISettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/inlineaipromptoutputactionfactory)>

The configurator for the outputactions setting.

#### RETURNS

Returns the current instance of [InlineAIPromptBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/inlineaipromptbuilder) instance.

### Readonly()

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

#### RETURNS

Returns the current [InlineAIPromptBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/inlineaipromptpopupsettingsbuilder)>

The configurator for the popup setting.

#### RETURNS

Returns the current instance of [InlineAIPromptBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/inlineaipromptspeechtotextsettingsbuilder)>

The configurator for the speechtotext setting.

#### RETURNS

Returns the current instance of [InlineAIPromptBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/inlineaipromptbuilder) instance.

### IsStreaming()

Sets the widget in a streaming mode.

#### RETURNS

Returns the current [InlineAIPromptBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/inlineaipromptbuilder) instance.

### Messages(System.Action)

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

#### Parameters

##### configurator - System.Action<[InlineAIPromptMessagesSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/inlineaipromptmessagessettingsbuilder)>

The configurator for the messages setting.

#### RETURNS

Returns the current instance of [InlineAIPromptBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/inlineaipromptbuilder) .

### Events(System.Action)

Configures the client-side events.

#### Parameters

##### configurator - System.Action<[InlineAIPromptEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/inlineaiprompteventbuilder)>

The client events action.

#### RETURNS

Returns the current [InlineAIPromptBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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`

The name.

#### RETURNS

Returns the current  instance.

### Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)

Sets the name of the component.

#### Parameters

##### modelExplorer - `Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer`

The name.

#### 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 Kendo.Mvc.UI.Fluent.WidgetFactory.DeferredScripts(System.Boolean,System.Boolean)

#### Parameters

##### deferred - `System.Boolean`

#### RETURNS

Returns a [DeferredWidgetBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/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.
