type: meya.facebook.wit.component.detect
class: WitDetectComponent
path: /meya/facebook/wit/component/detect.py
signature: detect_wit
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 |
context | ○ | ○ | dict | {} | Send context data with this component's event |
sensitive | ○ | ○ | bool | true | |
triggers | ○ | ○ | list | [] | Activate these dynamic triggers when the component runs |
detect_wit | ◉ | ◉ | str | The phrase to be sent to Wit for intent detection. |
Examples
Basic
triggers:
- keyword: meya.facebook.wit.component.detect
steps:
- integration: integration.wit
detect_wit: STRING
Full
triggers:
- keyword: meya.facebook.wit.component.detect
steps:
- 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
context:
STRING: ANY
sensitive: false
triggers:
- type: STRING
data:
STRING: ANY
timeout: 123
trigger_when: ANY
detect_wit: STRING