Git Product home page Git Product logo

oluwaseunmauwedo / tiledesk-ai Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tiledesk/tiledesk-ai

0.0 0.0 0.0 2.88 MB

Tiledesk Module for Conversational AI. Tiledesk is an open source conversational platform alternative to Intercom, Zendesk, Drift, Tawk.to and Tidio for Customer Service and Conversational Marketing.

Home Page: https://tiledesk.com/

License: MIT License

Python 100.00%

tiledesk-ai's Introduction

tiledesk-ai

Tiledesk Module for AI

This module uses a simple Feed Forward Network implemented using PyTorch (more to come in the future) to understand the user intent.

Use with the command line

NOTE: recommended Python version >= 3.9

Install

We recommend to install a python3 virtual env and install tiledesk-ai on it.

pip install virtualenv
python3 -m venv tileai
source ./tileai/bin/activate

Create your working folder:

mkdir tiledesk-ai
cd tiledesk-ai

Now synchronize with the source repo:

git clone https://github.com/Tiledesk/tiledesk-ai.git
cd tiledesk-ai
pip install -r requirements.txt

Now you can choose between two alternatives.

PRODUCTION MODE

If you are not interested in customize the code to improve/modify the module you can just use the production command:

pip install .

DEVELOPMENT MODE

For developement (if you want to modify the source code), use:

pip install -e .

This command will install the in-place the program. You can edit the script files and test them from the command line.

Train

Use the ./domain/nlu.json file to setup all intents train in your project.

nlu.json example

{
  "configuration": {
    "pipeline": ["auto"]
  },
  "nlu": [
    {	
      "intent":"hello_intent",
      "examples":["Hi","Hello"]
    },
    {	
      "intent":"goodbye_intent",
      "examples":["goodbye","bye","good night"]
    }
  ]
}

Actually configuration parameter only takes this settings:

"configuration": {
  "pipeline": "auto|embeddingwbag|feedforward|lstm|bert"
}

To train the model use the tileai command.

tileai command synthax:

> tileai train [-f nlu_filepath] [-o model_file_path]

nlu_filepath defaults to local /domain/nlu.json file.

Example:

tileai train -f domain/nlu.json -o models/my_trained_model

Query

> tileai query [-m model path] -t "question"

Query example:

> tileai query -m models/my_trained_model -t "ciao"

HTTP server

Run the HTTP server

You can run the tiledesk-ai module as a web app, launching the HTTP server. Default HTTP server port is 6006. You can change the port using the -p port option.

> tileai run [-p port]

Query from HTTP server

To train your model from http server:

POST http://localhost:port/train
{
	"configuration": {
		"algo": "auto"
	},
	"nlu": [{	
      "intent":"hello_intent",
      "examples":["Hi","Hello", "..."]
	},

	]
}

To query your model

POST http://localhost:port/model/parse
{
"model":"models/<name of the model>",
  "text":"..."
}

APIs

TODO

tiledesk-ai's People

Contributors

glorenzo972 avatar sponzillo avatar

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.