Code Monkey home page Code Monkey logo

bot's People

Contributors

awinja-j avatar harrietmm-zz avatar kwamboka82 avatar

Watchers

 avatar

Forkers

harrietmm-zz

bot's Issues

RND: Wit.ai

Background:

Wit.ai makes it easy for developers to build applications and devices that you can talk or text to. Our vision is to empower developers with an open and extensible natural language platform. Wit.ai learns human language from every interaction, and leverages the community: what's learned is shared across developers.

To Do:

Go through the wit.ai website and learn how it works
https://wit.ai/

Bot Documentation

Background:

Documentation is the best, and sometimes the only way you can keep a record of the work done, the strategies used, the changes that occurred and all the little specifics an average human mind is capable of forgetting. Knowing the history of the project is essential for the current plan of action as well as how you proceed in the future.

To Do:

Add a Readme.md file to the project with the following details

  • Name of the bot
  • what the bot is about
  • How to setup and run the bot in local machine
  • table of HTTP requests used by the bot
  • How to run tests
  • Link to a test bot
  • Link to the live bot

References:
https://www.makeareadme.com/

Python Docopts Bot

Background:

docopt is based on conventions that have been used for decades in help messages and man pages for describing a program's interface. An interface description in docopt is such a help message, but formalized.

To Do:
Create docopts.py
Create

  1. Introduction message
  2. Help command
  3. Options command
  4. usage command
  5. FAQ commands

Refrence
http://docopt.org/

WIT.AI Intergration

Background:

Wit.AI will be doing all the data interpretation and answering the questions. We need to integrate it into our bot so that it is able to receive the questions , process and return a response

To Do:

  • Create a file Engine.py
  • In Engine.py, create a function ask_question that takes in a variable question.
    ask_question returns a list response that contains the response from wit.ai

DB Integration

Background:

To handle clients who will want to be reached out to, we will be collecting the contact details so that they can be reached out to at a later time.
We will have a form that takes in all these details. This details will be stored in the DB/ Sent in realtime to persons responsible

To Do:
In your venv,

  • Install Peewee-async
    pip Install Peewee-async
  • Install AIOPG
    pip Install AIOP

Remember to pip freeze after every install

create database.py

Add the following DB configs:

Import Uvloop, PeeWee

From Peewee_async import postgresqldatabase

bp = Blueprint (' My_blueprint ')

# init DB connection

Global database

Database = Postgresqldatabase (database= ' webdb ',

Host= ' 127.0.0.1 ',

User= ' Postgres ',

password= ' 111111 ')

https://topic.alibabacloud.com/a/sanic-connecting-the-postgresql-database_1_44_30048819.html

Project Environment

Background:

Before we start, let’s install some packages and make sure that we have everything ready for the development of this project.
Prerequisites:
Python3.6+
env
PostgreSQL

To do:

Install and Configure the following in your devices, and freeze in requirements.txt

Brew install pip
https://ahmadawais.com/install-pip-macos-os-x-python/
Brew Install Postgres
https://gist.github.com/ibraheem4/ce5ccd3e4d7a65589ce84f2a3b7c23a3
https://www.moncefbelyamani.com/how-to-install-postgresql-on-a-mac-with-homebrew-and-lunchy/

Pip install VirtualEnv
https://virtualenv.pypa.io/en/latest/installation/

After this installation, be sure to switch on your local virtualenv before you continue with the rest of the installations.

Pip install Sanic
https://pypi.org/project/sanic/
Pip install Psycopg
http://initd.org/psycopg/docs/install.html

When done installing, please freeze and push requirements.txt to repo

https://pip.readthedocs.io/en/1.1/requirements.html

Ci/CD

Background:
Continuous integration (CI) is the software development practice of regularly integrating code changes into a shared code repository.

Continuous delivery (CD) and continuous deployment
Continuous delivery is all about the ability to continuously deliver integrated code, be it bug fixes or new features, to production. It means that your “green builds” are ready to go in one click, should you wish to release them.

Continuous deployment goes one step further as it allows you to automatically deploy live every main branch change that passes the CI.

To Do:

We will be using circle Ci for our ci/cd/
Set it up in the project by adding:

https://circleci.com/docs/2.0/enable-checks/

FAQ Documentation

Background:
a document (as on a website) that provides answers to a list of typical questions that users might ask regarding a particular subject
To Do:
Create a list of the FAQ's that the bot will answer, have them in FAQ.md
On Readme.md create a link that leads to FAQ.md

https://www.markdownguide.org/cheat-sheet/

Send Email Functionality

Background:

Users can request to be contacted on a later time by a sales person. User will be presented with a form that they can fill out and the details of this form will be sent to the database + sent as an email to the help email.

To Do:

Create Email.py
create a gmail email address that can be used to send the emails
https://developers.google.com/gmail/api/guides/sending

create a function email that takes in a variable called message.
and returns any of the HTTP status according to the what has occurred

https://www.freecodecamp.org/news/send-emails-using-code-4fcea9df63f/

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.