currently you can start a pretrained bot by using Python the following way:
interpreter = RasaNLUInterpreter( model_directory=os.path.join(execution_path, 'model_unpacked', 'nlu'), config_file=os.path.join(execution_path, 'config.yml') ) agent = Agent.load( os.path.join(execution_path, 'model_unpacked'), interpreter=interpreter, action_endpoint=action_endpoint )
you then can let the agent handle a message like this:
await agent.handle_text(message, sender_id=sender_id)
Compared to e.g the Rest API, this reduces the duration of a request/task tremenduously. If you want to use CustomActions, you can achieve this the following way:
action_endpoint = EndpointConfig(url=rasa_action_url)
meaning, that a webserver is started that can be reached via the core by sending a HTTP request. Depending on the situation, this can be very costly.
I am wondering if there is a way to avoid using a webserver for the CustomActions and instead call it programmatically?
Any help would be appreciated!