Skip to content
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

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from

Conversation

ear-dev
Copy link

@ear-dev ear-dev commented Aug 7, 2018

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.

Ubuntu and others added 4 commits August 2, 2018 16:59
@CLAassistant
Copy link

CLAassistant commented Aug 7, 2018

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ ericrosenthal
✅ ear-dev
❌ Ubuntu


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.

@arthurTemporim
Copy link
Collaborator

Hi @ear-dev , thank you for this PR

Now the .env file is following the Rocket.chat pattern:

.env

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.

token

Please add an explanation to apiai in the README too, if you have any trouble, please let me know.

Thank you very much 👍

@ear-dev
Copy link
Author

ear-dev commented Aug 13, 2018

Thanks @arthurTemporim!

I've fixed the PR.... can you take another look.

@ear-dev
Copy link
Author

ear-dev commented Aug 13, 2018

@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?

@Sing-Li
Copy link
Member

Sing-Li commented Aug 14, 2018

I think keeping it v2 only is fine. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants