Skip to content

Commit

Permalink
Merge pull request #207 from Yoctol/nlpmodel
Browse files Browse the repository at this point in the history
make NLP config model value match Facebook API
  • Loading branch information
chentsulin authored Nov 15, 2017
2 parents 4d63d0f + 1588233 commit a560602
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion packages/messaging-api-messenger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2573,7 +2573,7 @@ Param | Type | Description
------------------- | --------- | -----------
config | `Object` | Configuration of NLP.
config.nlp_enabled | `Boolean` | Optional. Either enable NLP or disable NLP for that Page.
config.model | `String` | Optional. Specifies the NLP model to use. Either a [language](https://developers.facebook.com/docs/messenger-platform/built-in-nlp#overview), or `custom`.
config.model | `String` | Optional. Specifies the NLP model to use. Either one of `{ENGLISH, CHINESE, DUTCH, FRENCH_STANDARD, GERMAN_STANDARD, TALIAN_STANDARD, POLISH, PORTUGUESE, ROMANIAN, SPANISH, VIETNAMESE}`, or `CUSTOM`.
config.custom_token | `String` | Optional. Access token from Wit.
config.verbose | `Boolean` | Optional. Specifies whether verbose mode if enabled, which returns extra information like the position of the detected entity in the query.
config.n_best | `Number` | Optional. The number of entities to return, in descending order of confidence. Minimum 1. Maximum 8. Defaults to 1.
Expand Down
26 changes: 12 additions & 14 deletions packages/messaging-api-messenger/src/MessengerTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,20 +320,18 @@ export type BatchItem = {
};

export type Model =
| 'zh'
| 'zh-Hans'
| 'zh-Hant'
| 'nl'
| 'en'
| 'fr'
| 'de'
| 'it'
| 'pl'
| 'pt'
| 'ro'
| 'es'
| 'vi'
| 'custom';
| 'CUSTOM'
| 'ENGLISH'
| 'CHINESE'
| 'DUTCH'
| 'FRENCH_STANDARD'
| 'GERMAN_STANDARD'
| 'ITALIAN_STANDARD'
| 'POLISH'
| 'PORTUGUESE'
| 'ROMANIAN'
| 'SPANISH'
| 'VIETNAMESE';

export type MessengerNLPConfig = {
nlp_enabled?: boolean,
Expand Down

0 comments on commit a560602

Please sign in to comment.