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

question #5

Closed
dcsan opened this issue Jul 25, 2016 · 6 comments
Closed

question #5

dcsan opened this issue Jul 25, 2016 · 6 comments

Comments

@dcsan
Copy link

dcsan commented Jul 25, 2016

hey - just found this here. very interesting and good to see you implement the full FB APIs.

do you plan to add anything for conversations etc? like botkit and msbot framework?

@miki2826
Copy link
Owner

Hi @dcsan - thanks!,
I don't think it is necessary to implement something that botkit already did.
I provide a more low level sdk that you can use to create your own higher level sdk or use as is.
That being said, if I'll see demand for it, I will consider it :)

@dcsan
Copy link
Author

dcsan commented Jul 26, 2016

yea, could be right. well maybe some example integration with a api.ai or other "conversation system" or NLP tools could be helpful...

are you just coding your bots using raw regexes? managing conversation state is quite a pain...

@miki2826
Copy link
Owner

I integrate today with WIT.ai. But I use it for NLP only.
I do manage the conversation state myself - it is a small pain but it is consistent and I have full control over it.

I will add some integration examples soon, thanks.

@dcsan
Copy link
Author

dcsan commented Jul 26, 2016

yes control is good ;)

I had some problems when in the middle of a bot kit conversation, and a menu event comes in from somewhere - ie not a conversation event. it's hard to exit the conversation. ms bot framework seems a bit more flexible for changing state to jump across trees, not just out of the loop.

@miki2826 miki2826 closed this as completed Aug 8, 2016
@chiransudha
Copy link

@miki2826 Hi Miki 2826 can you please post integration to wi.ai example. I am trying to integrate to wit.ai but kinda new to this.
Thank you.

@miki2826
Copy link
Owner

Hi @chiransudha ,

There are few ways to use WIT API.

  • The message API (for entity extraction)
const botly = new Botly({
    accessToken: "FACEBOOK_ACCESS_TOKEN"
    verifyToken: 'VERIFICATION_TOKEN'
});
const client = new Wit({accessToken: 'MY_TOKEN'});
botly.on('message', (sender, message, data) => {
   client.message(data.text, {})
   .then((data) => {
      console.log('Yay, got Wit.ai response: ' + JSON.stringify(data));
   })
   .catch(console.error);
});

With botly you can save the whole wiring with express and just call wit.runActions on message.
Also, replace the send action implementation with your own using botly.sendText for example

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

No branches or pull requests

3 participants