Sign inSign up

convmind/botzoo

By convmind

•Updated over 6 years ago

A gateway for a zoo of bots

Image
1

1M+

convmind/botzoo repository overview

⁠Bot Zoo

An Python implementation of BotZoo. A powerful chatbot development framework that requires no hardcore programing. Design a bot in 10 minutes and continuously improve its performance via interactive machine learning to reach the state-of-art performance.

⁠Installation

pip install -r requirments.txt

⁠Dockerize FlowBot

  • Login in with dockerhub account at both development and server
⁠Local Development
  • change docker.sh to executable file
  • sh docker.sh
⁠Server Deployment
  • docker pull convmind/flowbot
  • docker run -p 7000:7000 -d convmind/botzoo

⁠Usage

Use as a local variable

from botzoo import FlowBot
bot = BotZoo()

# create a new conversation
bot.create_session("{user_id}", "{graph_name}")

# send a message to the bot
bot.receive_event(session_id, usr_input, sync=True)

# terminate a conversation
bot.remove_session(session_id)

Use as a Restful API service using Flask

from botzoo import RestfulFlowBot
bot = RestfulFlowBot()
bot.run(port=3000)

See Restful API documentations for details.

⁠Luis Entity

For English/Chinese (LUIS name -> Internal Name)

  1. age -> Age
  2. datetimev2 -> DateTime
  3. money -> Money
  4. number -> Number
  5. temperature -> Temperature
  6. geography -> Geography (only English for now)
  7. email -> Email
  8. phone number -> PhoneNumber

⁠MongoDB

Two database will be used:

  1. flowmaker

    • graphs
    • sessions
    • users
  2. ml_core

    • intent

⁠Redis

Flowbot uses Redis as its dialog state memory. Run Redis via:

redis-server &
⁠Monitor the value of redis using Redsmin
⁠Redis Cheat Sheet
  1. Open terminal client:

     redis-cli
    
  2. Check all keys

  3. Set new value

  4. Read spcific keys

⁠External API call

The body of the POST call will contains the follow example JSON:

data = {'session': session ( a JSON dump of mongo document),
        'global_contexts': max_slot_vals ([{'name': 'location', 
                                            'value': 'pittsburgh'} ...],
        'registered_inputs': [{'sys': 'hi', 'usr': 'how are you'}...]}

    

Tag summary

Content type

Image

Digest

Size

369.2 MB

Last updated

almost 7 years ago

docker pull convmind/botzoo