Giter VIP home page Giter VIP logo

dazu's Introduction

Dazu Chatbot Engine

Dazu

Documentation Status BUILD Open Source Helpers Maintainability Test Coverage

Dazu is a powerfull engine dialogue engine with two main parts: NLU and dialogue. The main objetive of this project is too use existing chatbots projects and uses it to develop your solution.

The name was inspired by David Ausubel because the main objective of this project was to build a collaborative platform to maintain Bots for learning.

Inspired by Watson Assistant and Rasa.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

  • Docker:
docker-compose up --build
  • Editable mode:
pip install -e .
cd examples/my-first-bot
dazu train
dazu run
  • After that you should see this output:
dazu run
 * Serving Flask app "dazu.__main__" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)

Prerequisites

  • To build, first install all necessary dependencies:

All the dependencies can be find in requirements.txt and development in requirements-dev.txt.

Installing Development Environment

  • A step by step installation guide:
  1. Run these commands to install dazu in your python virtual env:
pip install -r requirements-dev.txt
pip install -e .
  1. Go to examples folder and start the project:
cd examples/my-first-bot
dazu train
dazu run
  1. Have fun ๐Ÿš€

Code Style

To ensure a standardized code style we use the formatter black. To ensure our type annotations are correct we use the type checker pytype. If your code is not formatted properly or doesn't type check, travis will fail to build.

Formatting

If you want to automatically format your code on every commit, you can use pre-commit. Just install it via pip install pre-commit and execute pre-commit install in the root folder. This will add a hook to the repository, which reformats files on every commit.

If you want to set it up manually, install black via pip install -r requirements-dev.txt. To reformat files execute

make formatter

Type Checking

If you want to check types on the codebase, install pytype using pip install -r requirements-dev.txt. To check the types execute

make types

Running the tests

Still needed

Deployment

Still needed

Built With

  • Python - The main programing language used

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Raphael Pinto - Creator - ralphg6

See also the list of contributors who participated in this project.

License

This project is licensed under the Apache-2.0 - see the LICENSE file for details

Acknowledgments

dazu's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dazu's Issues

Implement support for multiples NLU engines

To teach David how to handle different ways of understand "human messages", is needed to implement a generic way to receive data and handle it to generate a a useful conversation model.

Add in edge layer to adapt palyload to proper contract

The main idea is to support API payloads of any platforms. By example:

For input in Watson's API payload format:

POST http://localhost:5005/dialog?_if=watson

If the input format isn't explicitly informed, maybe we can build a component that tries to resolve the format.

Also maybe we can implement support to output format, but only if will be needed.

Implement the Watson JSON Reader

With issue #48, we will able to read in some formats.

And with issue #49, we will able to read JSON files.

The objective of this issue is to create a reader to read Watson's JSON file.

Configure integration tests

This is from #68

It is needed to configure and implement integration tests between:

  • David components
  • David intern APIs
  • David external APIs (like Rasa, IBM Watson and so on)

Add codeclimate badge

To show how technically good is this project, add the codeclimate is needed.

@ralphg6 as owner to add it is needed:

  1. Sign up into codeclimate (using GitHub account if you want)
  2. Add David project to codeclimate
  3. After the build, just click in Repo Settings and copy the badge URL

Now the project is classified as A it is the best rank of codeclimate! congratulations!!
I updated my fork with this badge if you want to see it:
https://github.com/arthurTemporim/david

Create project board

To help project management and avoid duplicated work, a project board should be created.

Document the creation process of a new adapter

In issue #19, we created a layer to adapt the dialog API for the desired format.

Now we able to build adapters for any formats compatible with Message object.

https://github.com/ralphg6/david/blob/bfb535c21f9bf7720e58d99653334972958e03f9/david/typing/message.py#L11

To build a new adapter is needs to implement the class Adapter.

https://github.com/ralphg6/david/blob/bfb535c21f9bf7720e58d99653334972958e03f9/david/adapters/adapter.py#L7-L21

As I built the MessageAdapter:

https://github.com/ralphg6/david/blob/bfb535c21f9bf7720e58d99653334972958e03f9/david/adapters/adapter.py#L24-L36

Implement JSON Reader

With issue #48, we will able to read in some formats.

The objective of this issue is to create a reader to read any JSON file.

Improve code documentation

To improve code maintainability and make the project learning curve easier, code documentation should be configurated and described.

Add property to bypass errors on read Training Data

The idea is include on CLI and config file a option that permit bypass some errors during training data reading.

Examples:

CLI:

david --ignore-read-errors

or config.yaml

ignore-read-errors: true

Other idea is create some levels for bypass...

Configure load tests

Issue from #68

It is needed to configure and implement load tests to David.

Tasks:

  • Define the tool to be used
  • Configure load tests
  • Implement at leas one load test

Document the API

The main idea is to use Swagger.

We too can create a playground for demonstrations.

Improve README.md

The README.md is the face of the project, so relevant information and descriptions is important to engage community members to use and contribute to this project. This issue aims to improve this project README.md.

Create a layer to abstract TrainingData readers

The idea is to modularize the training data reading to we will able to read in the format of many platforms.

It is important to highlight that some components of NLU or Dialogue can need a specific reader.

For example, to use Watson Alternative Dialogue components will need to use a reader for Watson's format.

Configure and implement Pytest

This issue aims to configure a unit tests tool.

Tasks:

  • Define a test tool (probably pytest)
  • Configure it locally
  • Add tests to CI
  • Add badge of project coverage
  • Create the first test of the project

Is important too:

  • Define how to make integration tests (very important to components usage). Moved to #76
  • Define how to make stress tests
  • Define how to make load tests. Moved to #77

Build a way to config the running instance

I think that we will able to configure two ways.

By config file and by CLI arguments. Being that CLI args prevail over the config file.

The configs must be easily available in all the project code.

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.