In the end (its been a long weekend of experimentation) the problem is that aiohttp requires a loop to work right which is problematic because rasa is already running a uvloop that doesn’t allow nesting. Otherwise it needs to do an await which blocks or create a task (fire and forget) which does the HTTP request in the background but generates an error because the result is not retrieved and screws up the next action so required a dummy action to clear the error. I’ll write a longer forum post for people trying to do this later, but essentially I resorted to using multiprocessing which did the request in the background, but didn’t generate an error. So using this works perfect in Rasa X local (though I can’t get it to work in rasa x using docker compose, if you had advice I’ve got another forum post http://forum.rasa.com/t/rasa-x-docker-compose-install-external-events-error/42113
Randywreed
(Randy Reed)
3
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| How to handle concurrent long tasks in the action server | 6 | 893 | July 12, 2022 | |
| How can we increase delay in Action Listening | 7 | 688 | March 8, 2022 | |
| Unable to accept other users messages while performing actions | 7 | 793 | July 12, 2022 | |
| How RASA bots can handle the delay in getting response | 8 | 1789 | June 20, 2019 | |
| Action server is blocking even though I have async run function | 0 | 395 | January 10, 2023 |