1.6.3 • Published 5 years ago

@gasbuddy/interaction-composer v1.6.3

Weekly downloads
20
License
MIT
Repository
-
Last release
5 years ago

interaction-composer

A command line tool to build interaction models (for Alexa for now) based on an intermediate format that is easier to maintain in source control and across deployment environments.

Usage

npx @gasbuddy/interaction-composer <path to json file>

See the test/model directory for a simple example that illustrates environment aware naming and intent inclusion.

Shorthands

One of the major goals of this module is to reduce the verbosity of intent expression. This includes centralizing relevant data in a single config (as opposed to spreading it around the intents, dialog and slot specifications), it includes support for YAML instead of JSON, and it includes expansion capabilities.

Expansion

Samples and slot samples support combinations. There are two main features, the bracket-pipe usage:

this is a test
this was a test
this will be a test

Can be expressed as

this [is|was|will be] a test

These combinations can include slots, and can also be empty. For example:

is [it|this {station}] open [|now|right now]

Will expand to:

is it open
is it open now
is it open right now
is this {station} open
is this {station} open now
is this {station} open right now

Additionally, you can use nested arrays (they're weird in YAML) to have common root patterns:

- [|more] [|{details}]
- -
  - about this [|{station}]

Which expands to:

more
more {details}
more about this
more about this {station}
more {details} about this
more {details} about this station
details
{details}
about this
about this {station}
{details} about this
{details} about this station
1.6.3

5 years ago

1.6.2

5 years ago

1.6.0

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.4.8

5 years ago

1.4.7

5 years ago

1.4.6

5 years ago

1.4.5

5 years ago

1.4.4

5 years ago

1.4.3

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.0.0

5 years ago