Giter Site home page Giter Site logo

botpress-rasa_nlu's Introduction

botpress-rasa_nlu

A module to use Rasa.ai with your Botpress bot.

Getting started

botpress install rasa_nlu

The Rasa NLU module should now be available in your dashboard.

You'll need a Rasa NLU server (local or in-cloud) to use this module, that will inject understanding metadata inside incoming messages through the Rasa API.

Events will have an rasa_nlu property populated with the extracted metadata from Rasa server.

Take a look:

bp.hear({'rasa_nlu.intent.name': 'greet'}, (event) => {
	bp.messenger.sendText(event.user.id, 'Hi Human! Nice to meet you!')
})

Enjoy Botpress!

Community

Pull requests are welcomed! We believe that it takes all of us to create something big and impactful.

There's a Slack community where you are welcome to join us, ask any question and even help others.

Get an invite and join us now! 👉https://slack.botpress.io

License

botpress-rasa_nlu is licensed under AGPL-3.0

botpress-rasa_nlu's People

Contributors

matheusmatos 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

Watchers

 avatar  avatar  avatar

botpress-rasa_nlu's Issues

Using with Rasa Core

I'm assuming to use this with Rasa core I just need to create a version of this that adjusts the server URL unless you want me to add something maybe to this project so you can use NLU or Core or both:

http://localhost:5005/conversations/default/parse?q="hello"

This is the normal format for Rasa Core.

Encoding problem

rasa_nlu expects the request params to be utf-8
When I send a message with german umlauts (e.g. ä ü ö), the message is encoded with cp1252 instead of utf-8 and rasa_nlu fails to parse it.

2017-12-07 10:37:05+0100 [_GenericHTTPChannelProtocol,1,127.0.0.1] Unhandled Error
	Traceback (most recent call last):
	  File "/Users/morth/src/enaptfix-bot/venv/lib/python3.6/site-packages/klein/app.py", line 50, in _call
	    result = f(*args, **kwargs)
	  File "/Users/morth/src/enaptfix-bot/venv/lib/python3.6/site-packages/rasa_nlu/server.py", line 92, in decorated
	    return f(*args, **kwargs)
	  File "/Users/morth/src/enaptfix-bot/venv/lib/python3.6/site-packages/rasa_nlu/server.py", line 77, in decorated
	    return f(*args, **kwargs)
	  File "/Users/morth/src/enaptfix-bot/venv/lib/python3.6/site-packages/twisted/internet/defer.py", line 1532, in unwindGenerator
	    return _inlineCallbacks(None, gen, Deferred())
	--- <exception caught here> ---
	  File "/Users/morth/src/enaptfix-bot/venv/lib/python3.6/site-packages/twisted/internet/defer.py", line 1386, in _inlineCallbacks
	    result = g.send(result)
	  File "/Users/morth/src/enaptfix-bot/venv/lib/python3.6/site-packages/rasa_nlu/server.py", line 133, in parse_get
	    for key, value in request.args.items()}
	  File "/Users/morth/src/enaptfix-bot/venv/lib/python3.6/site-packages/rasa_nlu/server.py", line 133, in <dictcomp>
	    for key, value in request.args.items()}
	builtins.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 5: invalid start byte

2017-12-07 10:37:05+0100 [-] "127.0.0.1" - - [07/Dec/2017:09:37:04 +0000] "GET /parse?q=Das%20T\xfcrschloss%20an%20meiner%20Eingangst\xfcr%20ist%20defekt&project=default HTTP/1.1" 500 4214 "-" "axios/0.15.3"

Confidence Scoring

By chance is there any way to only trigger if the confidence score is above a certain %? Wasn't sure if you had that setup yet or not.

Not loading module

The module only works after changing the order of the middleware and then changing back to it's original position.

I see on initial load of botpress:

info: Loaded botpress-rasa_nlu, version 1.0.0

in the console.

When I change the positions on in the middleware area of botpress I see in the console:

debug: Loading middleware: rasa_nlu.incoming

which I don't see on the initial load of the modules.

Please advise! Love to help

botpress 10.20.1 and rasa_nlu 0.12.3 how to integrate them?

Hi..

I am running botpress 10.20.1 and rasa_nlu 0.12.3 on centOS 7

my botpress nlu config as follow:

vi config/nlu.json

{
"intentsDir": "./generated/intents",
"entitiesDir": "./generated/entities",
"provider": "rasa",
"debugModeEnabled": false,
"minimumConfidence": "0.3"
}
~

and my rasa_nlu already configured and run using tensorflow
how to integrate it?

11:52:44 - info: Starting botpress version 10.20.1
11:52:44 - info: [Ghost Content Manager] (transparent) Initialized
11:52:44 - debug: [Ghost Content Manager] (transparent) Added root folder generated/media, doing nothing.
11:52:44 - debug: [Ghost Content Manager] (transparent) Added root folder generated/flows, doing nothing.
11:52:44 - info: [Skills] Initiated
11:52:44 - info: Loaded @botpress/audience, version 10.20.1
11:52:44 - verbose: [Renderers] Enabled for webchat.
11:52:44 - info: Loaded @botpress/channel-web, version 10.20.1
11:52:44 - info: Loaded @botpress/hitl, version 10.20.1
11:52:44 - debug: [Ghost Content Manager] (transparent) Added root folder generated/intents, doing nothing.
11:52:44 - debug: [Ghost Content Manager] (transparent) Added root folder generated/entities, doing nothing.
11:52:44 - info: Loaded @botpress/nlu, version 10.20.1
11:52:45 - info: Loaded @botpress/skill-choice, version 10.20.1
11:52:45 - info: Loaded @botpress/terminal, version 10.20.1
11:52:45 - info: Loaded 6 modules
11:52:45 - info: [Skills] Loaded 1 skills
11:52:45 - debug: [Ghost Content Manager] (transparent) Added root folder generated/content, doing nothing.
11:52:45 - debug: Loading middleware: rendering.instrumentation
11:52:45 - debug: Loading middleware: hitl.captureInMessages
11:52:45 - debug: Loading middleware: nlu.incoming
11:52:45 - debug: Loading middleware: hear
11:52:45 - debug: Loading middleware: hitl.captureOutMessages
11:52:45 - debug: Loading middleware: webchat.sendMessages
11:52:45 - debug: Loading middleware: fallback
11:52:45 - debug: Loading data for builtin_text from builtin_text.json
11:52:45 - info: Read 8 item(s) from builtin_text.json
11:52:45 - info: Bot launched. Visit: http://localhost:3000
11:52:45 - debug: Loading data for builtin_image from builtin_image.json
11:52:45 - debug: Loading data for builtin_single-choice from builtin_single-choice.json
11:52:45 - debug: Loading data for builtin_card from builtin_card.json
11:52:45 - debug: Loading data for builtin_action-button from builtin_action-button.json
11:52:45 - debug: Loading data for builtin_carousel from builtin_carousel.json
11:52:45 - debug: Loading data for builtin_raw from builtin_raw.json
11:52:45 - info: ------------
11:52:45 - info: Webchat available at http://localhost:3000/s/chat
11:52:45 - info: ------------
11:52:48 - debug: [NLU::Rasa] Could not fetch model versions
11:52:56 - debug: Dialog: [ N/A ] ( N/A ) ** LOAD
11:52:56 - debug: Dialog: [main] (entry) <> NTHG
11:52:56 - debug: Dialog: [ N/A ] ( N/A ) -- ENDF
11:52:58 - debug: [NLU::Rasa] Could not fetch model versions
11:53:08 - debug: [NLU::Rasa] Could not fetch model versions
11:53:18 - debug: [NLU::Rasa] Could not fetch model versions
11:53:28 - debug: [NLU::Rasa] Could not fetch model versions
11:53:38 - debug: [NLU::Rasa] Could not fetch model versions
11:53:48 - debug: [NLU::Rasa] Could not fetch model versions
11:53:58 - debug: [NLU::Rasa] Could not fetch model versions
11:54:08 - debug: [NLU::Rasa] Could not fetch model versions
11:54:18 - debug: [NLU::Rasa] Could not fetch model versions
11:54:28 - debug: [NLU::Rasa] Could not fetch model versions
11:54:38 - debug: [NLU::Rasa] Could not fetch model versions
11:54:48 - debug: [NLU::Rasa] Could not fetch model versions
11:54:58 - debug: [NLU::Rasa] Could not fetch model versions
11:55:08 - debug: [NLU::Rasa] Could not fetch model versions
11:55:18 - debug: [NLU::Rasa] Could not fetch model versions
11:55:28 - debug: [NLU::Rasa] Could not fetch model versions
11:55:38 - debug: [NLU::Rasa] Could not fetch model versions
11:55:48 - debug: [NLU::Rasa] Could not fetch model versions
11:55:58 - debug: [NLU::Rasa] Could not fetch model versions
11:56:08 - debug: [NLU::Rasa] Could not fetch model versions
11:56:18 - debug: [NLU::Rasa] Could not fetch model versions
11:56:28 - debug: [NLU::Rasa] Could not fetch model versions

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.