Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InteractionModelGenerator

Interaction model generator

  • For skills that use Controls Framework, use ControlInteractionModelGenerator

Hierarchy

Properties

Protected delegationStrategy

delegationStrategy: DelegationStrategyType

Protected dialogIntents

dialogIntents: DialogIntent[] = []

Protected intents

intents: Intent[] = []

Protected invocationName

invocationName: string

Protected modelConfiguration

modelConfiguration: ModelConfiguration | undefined

Protected prompts

prompts: Prompt[] = []

Protected slotTypes

slotTypes: SlotType[] = []

Methods

addDelegationStrategy

  • addDelegationStrategy(delegationStrategy: DelegationStrategyType): this
  • Add DelegationStrategy to the dialog model.

    Parameters

    • delegationStrategy: DelegationStrategyType

    Returns this

addDialogIntent

  • addDialogIntent(dialogIntent: DialogIntent): this
  • Add a DialogIntent to the dialog model.

    Parameters

    • dialogIntent: DialogIntent

    Returns this

addDialogIntents

  • addDialogIntents(...dialogIntents: DialogIntent[]): this
  • Add DialogIntents to the dialog model.

    Parameters

    • Rest ...dialogIntents: DialogIntent[]

    Returns this

addIntent

  • addIntent(intent: Intent): this
  • Add intent to interaction model

    Parameters

    • intent: Intent

      Intent

    Returns this

addIntents

  • addIntents(...intents: Intent[]): this
  • Add one or more intents

    Parameters

    • Rest ...intents: Intent[]

    Returns this

addOrMergeSlotType

  • addOrMergeSlotType(slotType: SlotType): this
  • Add or merge slot type

    If the slot and/or slot-values already exist, the new data is added.

    Parameters

    • slotType: SlotType

    Returns this

addOrMergeSlotTypes

  • addOrMergeSlotTypes(...slotTypes: SlotType[]): this
  • Add or merge slot types

    If the slot and/or slot-values already exist, the new data is added.

    Parameters

    • Rest ...slotTypes: SlotType[]

    Returns this

addPrompt

  • addPrompt(prompt: Prompt): this
  • Add a Prompt to the dialog model.

    Parameters

    • prompt: Prompt

    Returns this

addPrompts

  • addPrompts(...prompts: Prompt[]): this
  • Add Prompts to the dialog model.

    Parameters

    • Rest ...prompts: Prompt[]

    Returns this

addValuesToSlotType

  • addValuesToSlotType(slotName: string, ...values: TypeValue[]): this
  • Add a new slot value to an existing slot type

    If the slot-value already exists, the new data is added.

    Parameters

    • slotName: string
    • Rest ...values: TypeValue[]

    Returns this

build

  • build(): InteractionModelData
  • Build the interaction model.

    Returns InteractionModelData

    An InteractionModelData object.

buildAndWrite

  • buildAndWrite(filename?: undefined | string): void
  • Build the interaction model and write to disk or standard output.

    Parameters

    • Optional filename: undefined | string

      Filename(optional)

    Returns void

isSlotDefined

  • isSlotDefined(slotTypeId: string): boolean
  • Parameters

    • slotTypeId: string

    Returns boolean

isSlotValueIsDefined

  • isSlotValueIsDefined(slotTypeId: string, slotValueId: string): boolean
  • Parameters

    • slotTypeId: string
    • slotValueId: string

    Returns boolean

loadFromFile

  • loadFromFile(inputPath: string): this
  • Load an interaction model file (JSON format).

    Usage:

    • This method does not perform merging for all components. Call this method before any other methods.

    Parameters

    • inputPath: string

    Returns this

setModelConfiguration

  • setModelConfiguration(modelConfiguration: ModelConfiguration): this
  • Parameters

    • modelConfiguration: ModelConfiguration

    Returns this

withInvocationName

  • withInvocationName(name: string): this
  • Set the invocation name.

    Parameters

    • name: string

    Returns this