GithubHelp home page GithubHelp logo

jackdh / rasatalk Goto Github PK

View Code? Open in Web Editor NEW
296.0 18.0 87.0 18.28 MB

A chatbot framework for Rasa NLU

License: MIT License

JavaScript 98.28% HTML 1.70% Dockerfile 0.03%
rasa-nlu chatbot-framework bot bots rasa conversational-ai nlp botkit chatbot nodejs

rasatalk's Introduction

                 

Basic Overview

Rasa Talk is a Dialog Management tool built on top of Rasa NLU. It was built out of a desire for a open source on premise dialog management system. Originally inspired by Rasa UI inspiration was taken from watson conversation.

Rasa Talk can be used as just a training data generator but can also hook your chatbot up to Facebook/Telegram/Skype/Slack whatever!

Feel free to message me on Gitter chat

Build Status

Demo

https://www.talk.jackdh.com (User: [email protected] Pass: demo1234)

Installation

Prerequisites

git clone https://github.com/jackdh/RasaTalk/
Rename example.env to '.env'
Update the variables to include your MongoDB server IP and Rasa NLU IP.
yarn
yarn start

Docker

Update .env or docker-compose.yml with selected environment variables. (Mongodb volumes do not work on windows)

docker-compose up

Or view https://github.com/jackdh/RasaTalk/wiki/Setup for a more detailed setup guide

Up and Running

  • Update .env with correct environment variables.
  • Create a new user
  • Add a new Agent
  • Add some intents to the agent
  • Add some expressions to the intents.
  • Add entities if required.
  • Start training the model
  • Create a dialog node which is recognised by either and Intent or Regex.
  • Populate the rest of the node
  • Test it out on the right!

Features

Facebook / Skype / Third parties.

Third Party Intregration

Due to the constumisable nature of RT it's possible to hook it up to practically any third party chatbot you'd like. For starters I've included a quick example of how you might use [Botkit](https://github.com/howdyai/botkit) as a middleware to get to Facebook

Both Facebook and Telegram can be easily setup within the app 🚀 Check out the telegram setup wiki for more information!

Generate Rasa NLU Training Data

  • Agents - Create multiple agents to host multiple chatbots from one backend.
  • Intents / Expressions - Build multiple varied expressions within the agents either manually or with the variant generator.
  • Entities - Create multiple entities with their synonyms.
  • Entity insertion - Highlight to insert entities into expressions

Quickly add training data with entities

Dialog Management

  • Watson Conversation style dialog management.
  • Regex based or Intent based recognition.
  • Dynamic recognition with multiple Intents or Entities ie: #intent OR @entity
  • Smart contextual awareness
  • Slot Filling with default slot or prompting
  • Multiple and or varied responses.
  • Jump to nodes
  • Send and use REST API web hooks within nodes.
  • Conditional based responses, webhooks, jump to's.
  • Save user responses for future use within nodes or API's
  • Create quick reply buttons.

Dialog management Updating Nodes

Permission Based Editing

  • Role based, Group Based & individual user permissions.
  • Create secure user accounts using PassportJS
  • Limit user access to certain features within the application.

Fine grain permission control

Training Rasa

  • Convert Intents into training data.
  • Accurate entity insertion (Not just search and replace)
  • View current training time.
  • View models currently in training.

Generate, download & train Rasa UI.

Built in Chatbot / Rasa parsers

  • Ping the Rasa server directly to get a JSON response.
  • Test the chatbot directly to see output of dialog management.

Directly see NLU results and chatbot outputs.

Still to come!

Further Analytics

  • Fill out the front dashboard to expand on the simple analytics.

History

  • View user's chats with the chatbot.
  • Filter down based on criteria such as Dates, Topics or Intents.

Small Talk

  • Implement simple small talk.

Todo / Help requested!

  • Increase test coverage to 100%.
  • Add Travis / Appveyor
  • Provide autocomplete options for fields such as nodes.
  • Better validation / error notifications.
  • Add rename option for intents / expressions
  • Add backup option for node / training data.
  • Add sockets for chat as well as update notifications.

Known issues

  • Prettier is picking up a non existent issue with spacing.
  • Dashboard analytics need a default value.

Thanks

@Material-UI React Boilerplate

rasatalk's People

Contributors

beevelop avatar dependabot[bot] avatar imgbotapp avatar jackdh avatar ygortgaleno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rasatalk's Issues

Add Analytics on Rasa NLU parse requests.

Currently all Rasa NLU requests are parsed straight to the NLU and back. It would be usful to start logging these requests along with the question. These can later be fed back into the training data as to help implement machine learning.

Rasa Core?

Are there any plans to connect the UI with Rasa Core as well? Similar to how you have connected it to Rasa NLU.

While Adding Working flow conditions

/usr/local/lib/python3.6/site-packages/sklearn/metrics/classification.py:1143: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no predicted samples.
'precision', 'predicted', average, warn_for)
[Parallel(n_jobs=1)]: Done 12 out of 12 | elapsed: 0.1s finished
[Parallel(n_jobs=1)]: Using backend SequentialBackend with 1 concurrent workers.
/usr/local/lib/python3.6/site-packages/sklearn/metrics/classification.py:1143: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no predicted samples.
'precision', 'predicted', average, warn_for)

Add Socket Integration.

Currently the only way of generating a response is to use REST API's. I would like to add an option to use sockets.

This would give the benefit of for starters:

  • Accurate number of current users
  • Better analytics
  • Allow for easier human take over
  • Allow web hooks to work asynchronously

freeze in webpack built

image

It is sometimes implemented.

but usually It stops at webpack building.

I'm sure I'm connected to the Mongo DB.

please help me... L0L

No sirve >:v

Describe the bug
Pongan algo que si sirva, consumen mucho de nuestro tiempo.

Rasa HTTP Training Api on 200 returns zipped model

I look through your code in RasaTalk/server/mongo/controllers/training.js
In the train() function you are using wrong url so instead of
${process.env.RASASERVER}/train?project
it should be
${process.env.RASASERVER}/model/train?project

Furthermore if we look though documentation of Api
https://rasa.com/docs/rasa/1.2.9/api/http-api/#tag/Model
Request:
it need config key required but we are not adding any in the code
it need nlu in the mark down format but you are just sending model.data which is plain json
it also expects stories in markdown and domain in text format
Response for 200:
It returns zipped file but in your code of success of api call you are spiting the data but the response is zip that throws error

Either am i totally wrong here or are we using an old api of rasa ? Please let me know

Website Integration

Would be amazing to have support for website integration like a script tag that gets generated or something like that. I would love to help if such a feature does not exist. Thanks
CC @jackdh

Help needed - version of Rasa NLU/core

Rasa is constantly updating its nlu+core version. The docker-compose does not specify which version of rasa is used ( image: rasa/rasa_nlu ). Therefore, rasatalk is not working with the latest version. Can you specify which version are you using?

Add Machine Learning

In order to start start utilising the power of machine learning I'd like to implement something such as the following.

All incoming questions to the NLU are stored along with their returned values from the NLU.

From this information the user can quickly select if the question and the outcome are correct.

  • If they are this question (If original) can be added to the training data set.

Ideally this sort of information can be added automatically however this would still require some sort of feedback being given from a human.

Rasa NLU gives permissions error

rasatalk_1 | ServerResponse: [Function], rasatalk_1 | createServer: [Function: createServer], rasatalk_1 | get: [Function: get], rasatalk_1 | request: [Function: request], rasatalk_1 | maxHeaderSize: [Getter] }, rasatalk_1 | 'https:': rasatalk_1 | { Agent: [Function], rasatalk_1 | globalAgent: [Agent], rasatalk_1 | Server: [Function], rasatalk_1 | createServer: [Function: createServer], rasatalk_1 | get: [Function: get], rasatalk_1 | request: [Function: request] } } } rasatalk_1 | 2019-04-08T08:36:04.874Z Training Error: connect ECONNREFUSED 127.0.0.1:5000

Chat not working

Hi,
those are the steps that I did:

  • setup Rasa Core (0.12.2) and Rasa NLU (0.13.8) in the same docker, exposing on ports 5000 (NLU) and 5005 (Core)
  • setup RasaTalk with a local MongoDB and pointing Rasa NLU;
  • created an Agent with a couple of intents inside;
  • created a Flow with a couple of nodes;
  • trained Rasa with those infos;

After doing all those steps, I try to talk with the integrated Chatbot for each message I send I receive a "Sorry something went wrong".

What I'm doing wrong?

Where I can find the files to train Rasa Core (stories.md & domain.yml)?
Does RasaTalk create them like RasaUI?

Thank you so much

RASASERVER can't conect

Describe the bug
I can't conect to my RASA server and log doesn't shows why.

To Reproduce
Steps to reproduce the behavior:

  1. I change the env RASASERVER to my ip direction server
  2. I started the project
  3. The log shows all works well.
  4. When I login on my dashboard, it shows error to conect RASA

Expected behavior
To start used RASA Talk

Screenshots
image

Desktop (please complete the following information):

  • OS: Mac OS 10
  • Browser CHROME

how to config environment file on windows and how to get jwt secret token? is it necessary ??

`

  Mongo: undefined ✓
  Rasa: undefined
  Localhost: http://localhost:3000
  LAN: http://192.168.137.1:3000

MongoDB connection FAILED. It is required to register / login error: URL malformed, cannot be parsed

My .env file

ENABLE_TUNNEL=false
NODE_ENV=development
PORT=5001
RASASERVER=http://localhost:5000
MONGOCONNECTIONSTRING=mongodb://localhost:27017/rasalog

Screenshots
image

  • OS: window 10
  • Browser: Firefox

Failure instance: Traceback (failure with no frames): <class ‘rasa_nlu.train.TrainingException’>: Can not train an empty pipeline. Make sure to specify a proper pipeline in the configuration using the pipeline key.The backend configuration key is NOT supported anymore.

I am new to the RASA Stack and have downloaded the RASA Talk project.
After setting up my rasa_nlu file (based on the rasa starter pack), and connecting the NLU backend server with the project, I was unable to train my model after adding intents, utterances, and entities (which I was able to see on the MongoDB Atlas cloud).
The NLU server keeps throwing the following error every time I try to train a model:
rasa_nlu.data_router - [Failure instance: Traceback (failure with no frames): <class ‘rasa_nlu.train.TrainingException’>: Can not train an empty pipeline. Make sure to specify a proper pipeline in the configuration using the pipeline key.The backend configuration key is NOT supported anymore. "
image

On my NLU project, I have the following nlu_config.yml file:

language: "en"

pipeline: "spacy_sklearn"

So my pipeline should be set up, especially that I did use it to train a model before setting the rasa_nlu project as a server.

image

I also get the following in the console:
image

Has anyone else ever encountered this error ? Thank you!

Add Telegram Intregration

  • A new controller for Telegram
  • Updated HTML within ThirdParty/index.js
  • At least boiler code for test suites.

It does not look like Botkit currently supports Telegram. This may require further custom code for completion.

SLOT prompt

i have configured slot,but not working prompt and child node slot not working for me

Module not found: Error: Can't resolve

I get many errors like:

ERROR in ./node_modules/destroy/index.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\RasaTalk\node_modules\destroy'
 @ ./node_modules/destroy/index.js 14:17-30
 @ ./node_modules/send/index.js
 @ ./node_modules/serve-static/index.js
 @ ./node_modules/express/lib/express.js
 @ ./node_modules/express/index.js
 @ ./node_modules/botkit/lib/CoreBot.js
 @ ./node_modules/botkit/lib/Botkit.js
 @ dll reactBoilerplateDeps

on windows with yarn 1.7

where is the environment file and how to configure it?

Hi ,
The error pops up:Please check environment file ,no port /JWT/MONGO/....specified,when the code ran.

It might be the environment file issue:
logger.error('Please check environment file.');
if (!process.env.PORT) logger.error('No port specified');
if (!process.env.RASASERVER) logger.error('No Rasa ip specified');
if (!process.env.JWTSECRET) logger.error('No JWT Secret specified');
if (!process.env.MONGOCONNECTIONSTRING) logger.error('No Mongo specified');
debug('Please update the .env file');

Would you like show me the environment file for the reference?

Slots aren't being prompted.

Can we have a good documentation on how can we use the interface, specific to each and every part of the UI.
Slot isnt prompted.
image

Slot

Jackdh,
kindly give guide for slot filling configuration with rasa talk GUI. give any gif or document for this

thanks

Dont Connect to Rasa

Hello,
I've been trying for three days and I have not been successful yet. :/

Always on startup, its not connect to mongo db (I will tested with local, mongo in docker and mlab), showing:

rasatalk_1 | MongoDB connection FAILED. It is required to register / login error: failed to connect to server [192.168.0.7:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 192.168.0.7:27017]
mongo | 2018-12-19T13:20:48.343+0000 I STORAGE [initandlisten] WiredTiger message [1545225648:343823][1:0x7f3c2908ca40], txn-recover: Set global recovery timestamp: 0
mongo | 2018-12-19T13:20:48.358+0000 I RECOVERY [initandlisten] WiredTiger recoveryTimestamp. Ts: Timestamp(0, 0)
mongo | 2018-12-19T13:20:48.417+0000 I CONTROL [initandlisten]
mongo | 2018-12-19T13:20:48.418+0000 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
mongo | 2018-12-19T13:20:48.419+0000 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
mongo | 2018-12-19T13:20:48.421+0000 I CONTROL [initandlisten]
mongo | 2018-12-19T13:20:48.428+0000 I STORAGE [initandlisten] createCollection: admin.system.version with provided UUID: ef351971-04f7-406a-bd25-a5752108fe10
mongo | 2018-12-19T13:20:48.489+0000 I COMMAND [initandlisten] setting featureCompatibilityVersion to 4.0
mongo | 2018-12-19T13:20:48.507+0000 I STORAGE [initandlisten] createCollection: local.startup_log with generated UUID: 2a136f2a-b9ae-4f08-87f2-89f9f63ece0f
mongo | 2018-12-19T13:20:48.556+0000 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
mongo | 2018-12-19T13:20:48.565+0000 I NETWORK [initandlisten] waiting for connections on port 27017
mongo | 2018-12-19T13:20:48.569+0000 I STORAGE [LogicalSessionCacheRefresh] createCollection: config.system.sessions with generated UUID: 42a091ed-ece9-446d-9368-ecdde8696fad
mongo | 2018-12-19T13:20:48.653+0000 I INDEX [LogicalSessionCacheRefresh] build index on: config.system.sessions properties: { v: 2, key: { lastUse: 1 }, name: "lsidTTLIndex", ns: "config.system.sessions", expireAfterSeconds: 1800 }
mongo | 2018-12-19T13:20:48.655+0000 I INDEX [LogicalSessionCacheRefresh] building index using bulk method; build may temporarily use up to 500 megabytes of RAM
mongo | 2018-12-19T13:20:48.666+0000 I INDEX [LogicalSessionCacheRefresh] build index done. scanned 0 total records. 0 secs
mongo | 2018-12-19T13:20:48.669+0000 I COMMAND [LogicalSessionCacheRefresh] command config.$cmd command: createIndexes { createIndexes: "system.sessions", indexes: [ { key: { lastUse: 1 }, name: "lsidTTLIndex", expireAfterSeconds: 1800 } ], $db: "config" } numYields:0 reslen:114 locks:{ Global: { acquireCount: { r: 2, w: 2 } }, Database: { acquireCount: { w: 2, W: 1 } }, Collection: { acquireCount: { w: 2 } } } protocol:op_msg 101ms

another problem is the rasa not connect in any time (in yarn or docker startups)

How to solve it ?
Steps to reproduce the behavior:
i start the with docker-compose up.
in two times the auth is working,
register user,
create a agent and always showing the message "rasa not connect".

Desktop (please complete the following information):

  • OS: MacOS Mojave
  • Browser chrome, firefox developer edition, safari.

thanks for all support

Docker compose up to get error

$ RUN docker compose up -d
E: Unable to locate package libpng12-0
ERROR: Service 'rasatalk' failed to build: The command '/bin/sh -c apt-get update && apt-get install libpng12-0 bzip2' returned a non-zero code: 100

Im learner please give detailed configuration details thanks!

how to open existing rasa nlu/domain files in rasatalk ? #20

Describe the bug
I already have my rasa model ready and working. How to open those files in
RasaTalk? or How can I import files of existing models instead of creating a new one?

Desktop (please complete the following information):

  • OS: windows 10
  • Browser : Firefox
  • Version 65.0

It is not going any further

Describe the bug
VirtualBox:~/RasaTalk$ yarn
yarn install v1.13.0
$ npm run npmcheckversion
npm WARN lifecycle The node binary used for scripts is /tmp/yarn--1550479431722-0.303340767008462/node but npm is using /usr/local/bin/node itself. Use the --scripts-prepend-node-path option to include the path for the node binary npm was executed with.

[email protected] npmcheckversion /home/ajinkz/RasaTalk
node ./internals/scripts/npmcheckversion.js

[1/5] Validating package.json...
[2/5] Resolving packages...
⢀ lodash@>=4.17.11^Z

Screenshots
image

Desktop (please complete the following information):

  • OS: 16.04
  • Browser Firefox
  • Version 65.0

Add Slack Intregration

  • A new botkit controller for Slack
  • Updated HTML within ThirdParty/index.js
  • At least boiler code for test suites.

npm install crash

Hi, I like very much what you are doing! UNfortunatelly I am stuck

what I have: Ubuntu 18.04 conda venv python 3.6 rasa_coree and rasa_nla stable

when I start "sudo npm install" I get an error, see below
I already tried: sudo chown -R $USER:$(id -gn $USER) /home/dehnert/.config

(dehn_rasa0) dehnert@vmd37935:/RasaTalk$ sudo npm install
npm WARN lifecycle [email protected]: cannot run in wd [email protected] npm run npmcheckversion (wd=/home/dehnert/RasaTalk)

[email protected] postinstall /home/dehnert/RasaTalk/node_modules/cwebp-bin
node lib/install.js
⚠ EACCES: permission denied, mkdir '/home/dehnert/RasaTalk/node_modules/cwebp-bin/vendor'
⚠ cwebp pre-build test failed
ℹ compiling from source
/home/dehnert/RasaTalk/node_modules/each-async/node_modules/onetime/index.js:15
throw new Error(fnName + ' can only be called once.');
^
Error: callback() can only be called once.
at onetime (/home/dehnert/RasaTalk/node_modules/each-async/node_modules/onetime/index.js:15:11)
at /home/dehnert/RasaTalk/node_modules/download/index.js:156:5
at ConcatStream. (/home/dehnert/RasaTalk/node_modules/concat-stream/index.js:37:43)
at ConcatStream.emit (events.js:194:15)
at finishMaybe (/home/dehnert/RasaTalk/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:630:14)
at endWritable (/home/dehnert/RasaTalk/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:638:3)
at ConcatStream.Writable.end (/home/dehnert/RasaTalk/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:594:41)
at DuplexWrapper.onend (/home/dehnert/RasaTalk/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_readable.js:577:10)
at Object.onceWrapper (events.js:277:13)
at DuplexWrapper.emit (events.js:194:15)
npm WARN [email protected] requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @material-ui/core@1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node lib/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/dehnert/.npm/_logs/2019-04-05T06_21_42_704Z-debug.log
(dehn_rasa0) dehnert@vmd37935:~/RasaTalk$

any advice / Hint is highly welcome
with kind regards
achim

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.