Actually, I want to make a rasa chatbot that runs a YouTube link (when asked) and at the same time it should continue in chatting with the user.
The YouTube code is ready and works properly and I have implemented it as a custom action, but after 10 seconds it closes the YouTube page and then completes chatting with the user.
Is there a way to like run all custom actions as a background run?
by the way I am running the custom actions from another terminal.
You are totally right, but the point is that I am trying to make this chatbot as a virtual assistant.
So the user will only inform the chatbot like play me some musics for example.
And the chatbot should turn on the music using an API, and then completes chatting at the same time!
So i should run the custom action as a background run, or i should save the chatbot as a model and then i will be sending get requests to get the output which is not an efficient way (because custom actions will be useless)
If you have other suggestions, i will be more than interested to work on them.
I strongly suggest again to not handle this with the Rasa server.
But, if you really want to do this, it has become more of a Python question than Rasa anyway. You will need to find a way to detach the process from Python, and maybe save the PID into a slot to come back later in case you want to stop it.