I am trying to hit the API endpoint in order to have a conversation with my bot with a given message and conversation ID.
When I am running on my local machine, I can send a POST to http://localhost:5005/webhooks/rest/webhook .
The deployed version is at a different url such as https://rasa-x.com:8000. If I want to hit the API where this is deployed I am trying https://rasa-x.com:8000/webhooks/rest/webhook and sending the same payload:
{
"sender":"test1",
"message":"thanks"
}
I am getting a 404 error with this. I feel as if I am making a very small mistake here but I can’t seem to figure it out. Any idea why this isn’t working?
I used Helm. And yes I tried it with and without the port number. If I use the port number, I get a 404 saying not found, and for without the port number, it says that the request timed out.
That fixed the issue I was having! Thank you for your help!
I do have one other question! I am currently using a custom entity extraction component where the component is in the same working directory as the config file and called communication_preference.py.
However, when the project is being deployed, the logs show an exception where the module cannot be found.
This is the error that is logged:
Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/rasa/nlu/registry.py", line 121, in get_component_class
return rasa.shared.utils.common.class_from_module_path(component_name)
File "/opt/venv/lib/python3.8/site-packages/rasa/shared/utils/common.py", line 37, in class_from_module_path
m = importlib.import_module(module_name)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'communication_preference'
When I train on my local machine, the module is found and everything works great, but when deployed using Helm, this issue pops up. I’m assuming the module isn’t being added to the PATH but I am not sure how to go about doing this.
Glad to know I helped Can you mark my answer as solution to show the topic as solved?
As for your other problem, sorry I’m not sure how to solve it, I would need more details. Please create a new thread for that since it’s unrelated, more people would read the topic if it is new, and it will appear in search results if anyone has the same problem in the future.
So it turns out, this didn’t completely solve the issue I was having. As I continue testing it, I found that I am not able to hit other Rest endpoints like I was locally. For example, I am attempting to use a GET request to get the conversations tracker. I do a request to
rasa-x.com:8000/conversations/TrackerTest/tracker
But when I do, I get back an html response and a 200 code. This is weird b/c it should be a json with a tracker object. Are there any other changes i need to make to the values.yml that I haven’t alread?
Actually, I remember having problems with that endpoint as well, even in Local Mode. I figured I wasn’t using it correctly and never thought about it again since I didn’t need it.