-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(plugin-watson): revive watson plugin with assistantV2 #1401
Conversation
@vanbasten17 I can not add you to reviewers, but can you take a look at this PR please? 🙏 |
47ff1cc
to
a8e9806
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but we must be sure to return the results in the Botonic standard format. Remove @types/axios
devDep as the plugin is not in TS yet. Also, too many things happening in index.js
. Encapsulate it into a class WatsonOutputParser
. And call sth like:
const parser = new WatsonOutputParser()
const nluResults = await parser.toBotonicOutput(input.data)
Object.assign(input, nluResults)
dad071f
to
97436ab
Compare
97436ab
to
abcb6d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just 2 small observations (the documentation one I think it should be fixed), the rest LGTM!
Description
Botonic
plugin-watson
stopped working and a refactor has been needed to revive it.Documentation
We need to document that this plugin does not support V1 Assistant anymore. Instead, it supports V2 Assistant.
Now, the plugin options needed are:
apikey
url
assistant_id
version
(Optional: if not provided, '2020-04-01' will be used)Test
If you want to try the new plugin:
plugin-watson
version to it.input
in thepre
method.