type: meya.facebook.wit.trigger
class: WitTrigger
path: /meya/facebook/wit/trigger/trigger.py
signature: expect
Fields
field | signature | required | type | default | description |
---|---|---|---|---|---|
spec | ○ | ○ | Spec | null | Override the original spec for this element |
integration | ○ | ◉ | WitIntegrationRef | ||
intent | ○ | ○ | NoneType | null | Intent or list of intents expected to fire trigger |
intent_regex | ○ | ○ | str | null | Intent regex expected to fire trigger |
min_confidence | ○ | ○ | Real | 0.75 | Minimum confidence in order to fire trigger |
max_confidence | ○ | ○ | Real | 1.0 | Maximum confidence in order to fire trigger |
locale | ○ | ○ | str | null | The first 2 letters must be a valid ISO639-1 language, followed by an underscore, followed by a valid ISO3166 alpha2 country code. Locale is used to resolve the entities. |
coords | ○ | ○ | WitContextCoords | null | Coordinates of the user. Must be in the form of an object with 'lat': float and 'long': float. This field is used to improve ranking for wit/location's resolved values |
timezone | ○ | ○ | Timezone | null | Must be a valid IANA timezone. Used only if no reference_time is provided. Example: 'America/Los_Angeles' |
reference_time | ○ | ○ | str | null | Local date and time of the user in ISO8601 format. Do not use UTC time |
bot | ○ | ○ | BotRef | null | Bot used to evaluate this trigger |
action | ○ | ◉ | TriggerActionEntry | Action executed if this trigger matches | |
when | ○ | ◉ | typing.Any | Custom condition for when to evaluate this trigger | |
confidence | ○ | ○ | Real | null | Custom confidence override value for trigger matches |
expect | ◉ | ○ | Expect | null |
Examples
Basic
triggers:
- integration: integration.wit
when: ANY
expect: wit
steps:
- say: STRING
Full
type: meya.facebook.wit.trigger
spec:
type: STRING
data:
STRING: ANY
timeout: 123
trigger_when: ANY
integration: integration.wit
intent: STRING
intent_regex: STRING
min_confidence: 123
max_confidence: 123
locale: STRING
coords:
lat: 123
long: 123
timezone: TIMEZONE
reference_time: STRING
bot: element.name
action: COMPONENT
when: ANY
confidence: 123
expect: wit