-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add apiai option as an alternative to botkit studio #12
base: develop
Are you sure you want to change the base?
Conversation
Add option to use Dialogflow's apiai for bot logic
Ubuntu seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Hi @ear-dev , thank you for this PR Now the Can you please update this PR to the new environment variables names? I noticed too that your botkit studio token is in your .env file and add your token to this repository it's not good because everyone that starts to use this example will be using your bot, so it's good to remove it. Please add an explanation to apiai in the README too, if you have any trouble, please let me know. Thank you very much 👍 |
Thanks @arthurTemporim! I've fixed the PR.... can you take another look. |
@arthurTemporim @Sing-Li I am updating our apiai botkit implementation to use dialogflow v2. format.use has to change a bit, as does the authentication method. Do you want this PR to be backwards compatible, or just support v2 only, since dialogflow is moving in that direction? |
I think keeping it v2 only is fine. Thanks. |
When the env
apiai_token=''
is set, the bot will use the dialogflow middleware to talk to dialogflow instead of botkit studio.We have been configuring dialogflow intents with a
custom payload
which represents our RC attachments. In this way we can send any json format we want, to describe our rich message content.This PR also includes a
middleware.format.use
function which knows how to unpack the response from dialogflow and add the attachment to the RC message object.