-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue Proxying Rasa Parse #51
Comments
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? |
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 |
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? |
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) |
@rafaelariad I just basically modified https://github.com/paschmann/rasa-ui/blob/master/Dockerfile#L47 to include my rasa server address then did |
@paschmann just to make sure should the payload look like this after I have my token:
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. |
@btotharye - the method should be a POST, something like this:
|
Ok sorry getting closer what does this mean?
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? |
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. |
interesting thats what I'm doing but its failing I tried inside postman and this is the response back:
I'll have to keep messing around to figure out what is up |
Could you check if you have a Agent in Rasa UI called "Cisco Chatbot"? |
Lets also move the conversation here: https://gitter.im/rasa-ui/Lobby |
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. |
@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
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. |
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. |
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 |
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
The text was updated successfully, but these errors were encountered: