Comments (16)
@rafaelariad I just basically modified https://github.com/paschmann/rasa-ui/blob/master/Dockerfile#L47 to include my rasa server address then did docker build -t rasa-ui .
to build it and docker run -itd -p 5001:5001 rasa-ui
to spin it up
from rasa-ui.
Hi @btotharye - could you check this: https://github.com/paschmann/rasa-ui/wiki/Using-Rasa-UI-as-Middleware and see if it solves your problem?
from rasa-ui.
Sure also is what I'm doing the right process to have this interact with a external Rasa server I already have setup? Sorry didn't know about that in the wiki I'll check it out.
Thanks
from rasa-ui.
Yes, what you are doing is correct. Are you able to use the Rasa UI? Are you able to use the sidebar chat dialog to interact with the Rasa NLU backend successfully?
from rasa-ui.
hey @btotharye i know that this is another question, but, can you share the coe that you use to change the rasanluendpioint and how you run the dockerfile (i have been trying doing this too)
from rasa-ui.
@paschmann just to make sure should the payload look like this after I have my token:
url = "http://192.168.99.100:5001/api/v2/rasa/parse"
question = 'hello'
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {}'.format(token)
}
params = {"q": question, "project": "chatbot"}
r = requests.get(url, headers=headers, params=params)
This is how I do my other api calls but I'm still getting cannot get /api/v2/rasa/parse as the error atm. I can definitely see the redirect is happening cause I see the requests coming into my Rasa server.
from rasa-ui.
@btotharye - the method should be a POST, something like this:
var request = require("request");
var options = { method: 'POST',
url: 'http://localhost:5001/api/v2/rasa/parse',
headers:
{ 'Postman-Token': 'fc7b3022-70c4-bdf8-5eff-425c0d7b55b1',
'Cache-Control': 'no-cache',
Authorization: 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1MjA0Nzk3NjJ9.nSCzx1V-bS_S77G8uICZgFJub_5q4sukByiq6f_sgY4',
'Content-Type': 'application/json' },
body:
{ q: 'resturants in new york',
project: 'Dining Out',
model: 'model_20180307-131724' },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
from rasa-ui.
Ok sorry getting closer what does this mean?
{'message': {'data': {'type': 'undefined'},
'errorcode': 'EKEYTYPE',
'message': 'The key argument has to be of type `string` or `number`. Found: `undefined`',
'name': 'EKEYTYPE'},
'status': 'error'}
I wasn't sure if I had to send it the actual model or if just the project is enough and in this case the project is the Project in Rasa UI or my project in my Rasa server?
from rasa-ui.
I am not entirely sure to be honest - not a very descriptive error ...
You would need to send the project name on the Rasa Server.
from rasa-ui.
interesting thats what I'm doing but its failing I tried inside postman and this is the response back:
{
"status": "error",
"message": {
"expose": true,
"statusCode": 400,
"status": 400,
"body": "{ q: 'hello',\r\nproject: 'Cisco Chatbot',\r\nmodel: 'chatbot*model_20180326-185644' },\r\njson: true };",
"type": "entity.parse.failed"
}
}
I'll have to keep messing around to figure out what is up
from rasa-ui.
Could you check if you have a Agent in Rasa UI called "Cisco Chatbot"?
from rasa-ui.
Lets also move the conversation here: https://gitter.im/rasa-ui/Lobby
from rasa-ui.
I created it manually wasn't sure if that had to be there or not, I already have on my rasa server a model trained called chatbot which is what I'm trying to proxy this stuff to. All I did so far was modify the https://github.com/paschmann/rasa-ui/blob/master/Dockerfile#L47 to be my ip address of my rasa server and spun it up, wasn't sure if there were other steps required or not.
from rasa-ui.
@btotharye Rasa UI needs to have Agent information in its database. There is logging and webhook information tied to an agent that gets pulled for every request. There are multiple ways you can get to it
- Either manually create an agent and start adding intents, entities, utterance details.
- or by uploading an existing rasa_nlu domain data in JSON format
The later one would be more suitable in your case since you already have domain data from nlu. Also remember that Project name in NLU servers should be same as the Agent name in Rasa-ui.
from rasa-ui.
I was working with @paschmann on this in gitter it actually appears to be an issue with https://github.com/paschmann/rasa-ui/blob/master/server/routes/middleware.js#L43 through 45 because once I commented that out everything started working the way it should with my remote NLU server I already have setup.
I'm gonna work on it a bit and see if I can see what is causing all the issues.
from rasa-ui.
actually it wasn't a bug after all in those lines I just tested now and its working I think part of it was how I was issuing the output so for documentation purposes this is how I have it working:
url = "http://192.168.99.100:5001/api/v2/rasa/parse"
question = "hello"
payload = "q={}&project=chatbot".format(question)
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Bearer {}'.format(token)
}
r = requests.post(url, data=payload, headers=headers)
response.json()
which now works properly and proxies to my Rasa server and gives me back the results:
{'entities': [{'confidence': 0.7423392842897176,
'end': 5,
'entity': 'serial',
'extractor': 'ner_crf',
'start': 0,
'value': 'hello'}],
'intent': {'confidence': 0.5612418049086964, 'name': 'greet'},
'intent_ranking': [{'confidence': 0.5612418049086964, 'name': 'greet'},
{'confidence': 0.12778262542564556, 'name': 'goodbye'},
{'confidence': 0.12426149548459074, 'name': 'affirm'},
{'confidence': 0.06779630706788278, 'name': 'cisco_serial'},
{'confidence': 0.06100715539325644, 'name': 'about'},
{'confidence': 0.05791061171992811, 'name': 'help'}],
'text': 'hello'}
So sorry for the issue seems it was just how I was making the call and I didn't realize the project needed to be equal to my agent name.
Thanks again
from rasa-ui.
Related Issues (20)
- Rasa core returning 500 for custom action, request fired from rasa-ui
- ISSUE IN STARTING UI HOT 2
- Geeting permision issue while training on docker compose way HOT 2
- How to load a model per bot ?
- How to load multi-bot at the same time? HOT 1
- Windows installation issue
- npm start failed
- Documentation or instructions? HOT 1
- Manage multiple bots from a single UI/instance of Rasa UI HOT 2
- Could not load information from Rasa Server HOT 1
- Can not see any bots HOT 4
- custom action in Rasa-ui HOT 1
- Can I export bot entities and intents in json format ?
- Can't understand how to train, and fill the data? HOT 1
- Improving the story editor HOT 1
- unable to train core data HOT 1
- Rasa UI unable to connect to Rasa server HOT 3
- Chat not started after train model HOT 4
- Error loading model HOT 1
- package-lock.json file causing problems in installation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rasa-ui.