Good Day, I would like to run and interface a face recognition program alongside a Rasa Voicebot in a local machine. As Rasa does not support multithreading, Can you suggest any alternative methods that I can use to interface and exchange the processed information between two programs. If possible, can you recommend any video tutorial ? Thank you.
Welcome to the community
To use Rasa inside a custom application, you can use its REST API.
From the docs:
The REST channel will provide you with a REST endpoint where you can post user messages and receive the assistant’s messages in response.
-
Add the REST channel to your credentials.yml:
rest: # yes, just that
-
Restart your server to make the REST channel available to receive messages:
rasa run actions --cors "*" && rasa run --enable-api --cors "*" --debug
-
You can then
POST
messages tohttp://localhost:5005/webhooks/rest/webhook
, with the following format:{ "sender": "test_user", // unique ID of the user sending the message "message": "Hi there!" }
-
The response from Rasa Open Source will be a JSON body of bot responses, for example:
[ {"text": "Hey from Rasa!"}, {"image": "http://example.com/image.jpg"} ]
These only apply for a local installation of Rasa. If you want to deploy your app/bot on a server instead, the process is a bit different.
Thank you Chris for the link to the doc and the explanation :). Let me try implementing and get back to you about the outcome. Thanks,
Happy to help Don’t hesitate to ask if you’re confused