Giter Site home page Giter Site logo

language-messenger-bot's Introduction

A proof of concept of a Messenger Chatbot teaching new languages to users. The user is specified to choose a language and a scenario he will have to walk through. The chatbot can learn the user's behavior with AI.

Local development

  • Download ngrok: https://ngrok.com/ or brew

  • Set up environment variables:

  • Run npm start / npm run dev and on an other terminal: ngrok http 1337 (port)

  • Now paste this link to the Messenger Development platform

To add a "Get Started" button

curl -X POST -H "Content-Type: application/json" -d '{
  "setting_type": "call_to_actions",
  "thread_state": "new_thread",
  "call_to_actions": [
    {
      "payload": "Start"
    }
  ]
}' "https://graph.facebook.com/v2.6/me/thread_settings?access_token=<PAGE ACCESS TOKEN>"

language-messenger-bot's People

Contributors

adtm avatar pkey avatar dependabot-preview[bot] avatar snyk-bot avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

language-messenger-bot's Issues

Plan next steps

  1. Figure out what tools can we use from DialogFlow
  2. Decide on what main functionalities we can build on these tools. Suggestions:
    1. Chatting with bot casually and it would correct your mistakes every time you typed or miss typed something badly instead of saying I don't understand. It could send a spelling card to you or the whole sentence written correctly. After that the conversation could continue.
    2. We should focus on maximum two languages first. It would be wise that bot could speak and understand both, simultaneously. Text translate pre built bot looks like it has some nice intents to build on that. In addition, we shallonly choose btw these four, as they are supported by small talk prebuilt bot (english, russian, french and italian)
    3. There are many pre-built bots which serve different purposes (like booking a restaurant). These real life situations (intents) could be borrowed, to help user practice the language.
    4. We could add bot responses on the go. That is, we would have all of them in one language, and constantly ask for the user to tell us how to say this phrase in our language. Then, when he would say we would add it to our response list.
  3. Share work and do things. Still need to define a clear goal, so that we won't work in different directions.

Work on: Restaurant Booking bot

Need to fully implement restaurant booking bot. Prebuilt version mostly deals with "any" restaurant. Because we only want to simulate single specific restaurant's booking we need to modify the bot to resemble a real conversation.

We might use "required" inputs in order to ask user follow up questions until the restaurant is booked.

All of this might involve redefining the restaurant booking bot.

Implement routing to different agents

Link to gist which does something similar: "

https://bots.dialogflow.com/facebook/70ac5471-f9b0-4104-8f73-918eecc4f8a1/webhook

Link to an old forum thread, talking about he possible solution:

https://discuss.api.ai/t/how-to-switch-between-agents/6690/6

My suggestion is to use "main" bot as a proxy first, but then it would connect via hook to a backend service in case scenario is being played and then route the user to correct agent.

Proxy is needed because we still need to parse user input anyways.

There is also a thing that when the scenario is played out you don't want agent to recognize most of (or all) of main agent's (and, of course, all of the other agents') commands.

Implement "main" agent, who would allow to choose which scenario user wants to try.

Subtasks:

  1. Create an intro question, something like: "Hey! Which scenario would you like to try?" and then user would be presented with a list from possible scenarios. (or list alternative).
  2. When user chooses a scenario, he should be routed to correct agent starting new conversation.
  3. When conversation with a specific agent ends, user should be routed back.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.