No project found with name 'undefined' Botkit + rasa_NLU - javascript

I am trying to deploy on Slack a chatbot that I have developed with rasa_nlu and that I can run locally on my computer by launching a python script on a Ubuntu shell. So I am trying to use botkit.
I am trying to follow this tutorial :
https://github.com/sohlex/botkit-rasa
I have managed to connect to Slack (basically the bot that I have created on Slack appears as online). Now when I talk to the bot I get the following error message on my Ubuntu shell :
I guess it’s all about where (in what folder) I enter the command (or what I enter as project path) :
$ python -m rasa_nlu.server --path projects
Do you have any insight for this ?
Thank you for the help,
Best,

I had the same issue and the below code fixed it for me.
var rasa = require('botkit-rasa')(
{rasa_uri: 'http://localhost:5000', rasa_project: 'default'});

Related

How to run a command in a node app deployed to Heroku?

I'm trying to learn how to deploy my apps and the teacher told us to use Heroku. I have a Node.js app that uses readline library to read a and b and outputs the sum of two numbers to the console and the cycle repeats. Is there a way to pass that data to the app when its deployed to Heroku and running? I found only a heroku-cli command heroku ps:exec but i don't know how to "enter" the running node process from there.
I know this exercise doesn't make sense but for me it's a hard question. Thank You for any help.

deploying js with python and spacy lib

I have never setup things this way, I got it running locally but have no clue how I should have do it when I deploy it into an ec2 server
I have a node app running already in ec2 server but recently I have added spaCy into one of my api.
The basic logic is calling the api which runs node and part of the js script uses spawn to process the proc.py file and do some calculation with outputs.
I have tried the following below to setup on my server but of course it failed when calling the api
my original node app is in /var/www/myApp
I used sudo apt install virtualenv then inside my /var/www/myApp I ran the command virtualenv venv which creates the virtual environment...
I did a source venv/bin/activate to get into the virtual environment
Then I started running the commands to install spacy mentioned in the spacy documentation https://github.com/explosion/spaCy
used this command to install pip install -U spacy and python -m spacy download en
Then I ran python -m spacy validate to see if spacy is installed which I got
Installed models (spaCy v2.0.11)
/var/www/myApp/venv/local/lib/python2.7/site-packages/spacy
TYPE NAME MODEL VERSION
package en-core-web-sm en_core_web_sm 2.0.0 ✔
link en en_core_web_sm 2.0.0 ✔
which I believe this means the installation is a success.
But after this, I am not sure what I should do to continue.
I tried running my api but getting this as an error message "err": "Traceback (most recent call last):\n"
I would believe the spacy module is not being called that's why I am getting this error but I am not sure what I should do to get this working.
Would really appreciate for any help, thanks in advance for any advices.
EDIT:
my proc.py code is below
if __name__ == '__main__':
import sys
import json
import spacy
nlp = spacy.load('en')
text = sys.argv[1]
doc = nlp(text)
all_noun_tokens = [ token.lemma_ for token in doc
if (token.pos_ == 'PROPN'
or token.pos_ == 'NOUN'
or token.tag_ == 'NN'
or token.tag_ == 'NNP') ]
print(json.dumps(all_noun_tokens))
P.S. I am wondering if there's any config that I need to do in order for my app to find where the virtuanenv is so it can detect the spacy module?

First build of Node.JS application in TFS 2015 Update2

I'm trying to build my first (Hello world) app in Node.js.
I was reading following tutorial:
https://www.visualstudio.com/en-us/docs/build/apps/node/nodejs-to-azure
My problem is that after clicking Queue Build I have following alert:
"No agent could be found with the following capabilities: npm, node.js".
And actually... this is true.
Where I can found a specific version to be installed on my TFS server?
Thank you for any help.
It was so easy :-).
I installed Node.Js from official site, and then I restarted VSO Agent in services.msc

How can i start WebRTC sample application?

I've read a lot of documents about webRTC. Now I want to implement a sample application. I went through this useful stack overflow question.
And I got some client, a server in Javascript. I don't know how to start to see this demo . What are the steps should I take?
They explained like :
signaling technology: WebSockets
client: pure html/javascript
server: node.js, ws
last tested on: Firefox 40.0.2, Chrome 44.0.2403.157 m, Opera 31.0.1889.174
I understand this but I don't have much practical knowledge on this. These are my questions to setup this demo ?
Should I have a hosting account ? or can I use this with my
localhost ?
Next , where should I done this node.js, ws ? can I use with linux
machine and install npm and run the server.js file on that ?
How can I start client.js code on my Linux machine ?
Only server.js and client.js file is required to setup this
application ?
I am new with WebRTC too, but i hope my answer can satisfy you
You can use that demo in localhost
You can install nodejs in linux machine and run server.js on that.
To run the demo
run server.js through nodejs. Make sure you installed ws package first.
then you create a directory name static and put client-side code in there.
open your browser and go to localhost:80 to see the demo.
Yes, you just need 2 files to setup that application. The client file in Working Hello World WebRTC DataChannel Examples with Signaling Implemented is a html file not javascript.
You can see another tutorial in here: http://www.tutorialspoint.com/webrtc/webrtc_environment.htm
Sorry for my bad English.

Bot Builder for Node.js vs Bot Connector Node.js for creating bot that provides button options

I'm confused as to when Bot Builder for Node.js should be used to create a Bot vs using Bot Connector Node.js, or how they are supposed to be used together.
Specifically, its unclear to me how to respond to a user with keyboard suggestions in Kik or lets say button options in Facebook. It appears like Bot Connector Node.js is an entirely different approach to receiving messages from a user and sending a response back as shown in the documentation here: http://docs.botframework.com/connector/libraries/node/#navtitle. Why is Bot Connector Node.js creating a completely separate server? With Bot Builder for Node.js aren't I already creating a server to send and receive messages?
The Bot Framework SDK for Node.js is available via the NPM module botbuilder. Install the module into your project using npm install --save botbuilder and start building your bot.
You can view the source code for the Node SDK in the repository Microsoft/BotBuilder in the Node/core/src/ directory here.
You will also find some helpful example bots that demonstrate various features of Bot Framework in the repository Microsoft/BotBuilder-Samples.
For more information check out the Getting Started Guide for Node SDK.

Categories