TemplateEngineLanguageGenerator class

LanguageGenerator implementation which uses LGFile.

Extends

Configurable

Constructors

TemplateEngineLanguageGenerator(Templates | Resource, Map<string, Resource[]>)

Initializes a new instance of the TemplateEngineLanguageGenerator class.

Properties

$kind
id

Methods

generate(DialogContext, string, D)

Method to generate text from given template and data.

Inherited Methods

configure(Record<string, unknown>)

Fluent method for configuring the object.

getConverter(string)

Constructor Details

TemplateEngineLanguageGenerator(Templates | Resource, Map<string, Resource[]>)

Initializes a new instance of the TemplateEngineLanguageGenerator class.

new TemplateEngineLanguageGenerator(arg1?: Templates | Resource, arg2?: Map<string, Resource[]>)

Parameters

arg1

Templates | Resource

Optional. An LG Templates or a Resource.

arg2

Map<string, Resource[]>

Optional. A Map object with a Resource array for each key.

Property Details

$kind

static $kind: string

Property Value

string

id

id: string

Property Value

string

Method Details

generate(DialogContext, string, D)

Method to generate text from given template and data.

function generate(dialogContext: DialogContext, template: string, data: D): Promise<T>

Parameters

dialogContext

DialogContext

Context for the current turn of conversation.

template

string

Template to evaluate.

data

D

Data to bind to.

Returns

Promise<T>

A Promise string with the evaluated result.

Inherited Method Details

configure(Record<string, unknown>)

Fluent method for configuring the object.

function configure(config: Record<string, unknown>): this

Parameters

config

Record<string, unknown>

Configuration settings to apply.

Returns

this

The Configurable after the operation is complete.

Inherited From Configurable.configure

getConverter(string)

function getConverter(_property: string): Converter | ConverterFactory

Parameters

_property

string

The key of the conditional selector configuration.

Returns

Converter | ConverterFactory

The converter for the selector configuration.

Inherited From Configurable.getConverter