question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue Proxying Rasa Parse

See original GitHub issue

So I setup the docker instance and modified the rasanluendpoint to include my address where my Rasa instance is.

So then I sent the following command to the Rasa UI to parse hoping it would go to that system but I’m getting a auth error and not sure what the payload expects:

http://192.168.99.100:5001/api/v2/rasa/parse - the URL I used params = {“q”: question, “project”: “chatbot”} - the payload and question is just a simple hello.

The error I get is:

{'message': 'No Authorization header.', 'success': False}

So what is the right format for this call?

Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
btotharyecommented, Mar 27, 2018

@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

0reactions
btotharyecommented, Mar 28, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rasa nlu server problem with the error 500 and parsing
I started the nlu server by typing this command in cmd: rasa run --enable-api -m ...
Read more >
Rasa bot bad request and cors proxy issue
Rasa core version 13.7 nlu version 14.6 os windows 10 python version 3.5. i created rasa chatbot and trained nlu as well as...
Read more >
[Solved]-Rasa bot bad request and cors proxy issue-node.js
[Solved]-Rasa bot bad request and cors proxy issue-node.js ... Go to the RASA project folder and run the following: rasa run --enable-api --cors...
Read more >
THE RASA MASTERCLASS HANDBOOK - HubSpot
After you've created your training data (see Episode 2 for a refresher on this topic), you are ready to configure your pipeline, which...
Read more >
rasa-nlu-trainer - npm Package Health Analysis - Snyk
rasa -nlu-trainer · This is a tool to edit your training examples for [rasa NLU](https://github.com/golastmile/rasa_nlu) For more information about how to use ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found