Not able to serve Rasa as a rest service

Hi Team,

I am new to Rasa and installed the latest version. I have created new project by using

rasa init --no-prompt

I am able to run the rasa in shell using below command and interact but not able to make this as a service so that I can call this server from the UI to interact.

rasa shell

It would be great help If someone helps me on this.

Thanks, MO

hey @reddimohan, you need to run the below command to run the rasa as rest service:

rasa run -m models --enable-api --cors “*” --debug

:slight_smile:

1 Like

Thanks @JiteshGaikwad for the command.

now I see below output for the given command

2019-06-19 22:24:01 DEBUG rasa.cli.utils - Parameter ‘endpoints’ not set. Using default location ‘endpoints.yml’ instead. 2019-06-19 22:24:01 DEBUG rasa.cli.utils - Parameter ‘credentials’ not set. Using default location ‘credentials.yml’ instead. 2019-06-19 22:24:07 DEBUG rasa.model - Extracted model to ‘/tmp/tmpj3r55xhy’. 2019-06-19 22:24:07 DEBUG rasa.core.utils - Available web server routes: /conversations/<conversation_id>/messages POST add_message /conversations/<conversation_id>/tracker/events POST append_events /webhooks/rasa GET custom_webhook_RasaChatInput.health /webhooks/rasa/webhook POST custom_webhook_RasaChatInput.receive /webhooks/rest GET custom_webhook_RestInput.health /webhooks/rest/webhook POST custom_webhook_RestInput.receive /model/test/intents POST evaluate_intents /model/test/stories POST evaluate_stories /conversations/<conversation_id>/execute POST execute_action /domain GET get_domain / GET hello /model PUT load_model /model/parse POST parse /conversations/<conversation_id>/predict POST predict /conversations/<conversation_id>/tracker/events PUT replace_events /conversations/<conversation_id>/story GET retrieve_story /conversations/<conversation_id>/tracker GET retrieve_tracker /status GET status /model/predict POST tracker_predict /model/train POST train /model DELETE unload_model /version GET version 2019-06-19 22:24:07 INFO root - Starting Rasa Core server on http://localhost:5005 2019-06-19 22:24:07 INFO root - Enabling coroutine debugging. Loop id 94528261449512. 2019-06-19 22:24:07 DEBUG rasa.model - Extracted model to ‘/tmp/tmplxiauxcc’. 2019-06-19 22:24:08 DEBUG rasa.model - Extracted model to ‘/tmp/tmpo5cxu21b’. /home/mo/anaconda3/envs/rasa36/lib/python3.6/site-packages/pykwalify/core.py:99: UnsafeLoaderWarning: The default ‘Loader’ for ‘load(stream)’ without further arguments can be unsafe. Use ‘load(stream, Loader=ruamel.yaml.Loader)’ explicitly if that is OK. Alternatively include the following in your code:

import warnings warnings.simplefilter(‘ignore’, ruamel.yaml.error.UnsafeLoaderWarning)

In most other cases you should consider using ‘safe_load(stream)’ data = yaml.load(stream)

I see lot of API endpoints are available, can you send me the link where I can go through about each endpoint and understand. My goal is to create a simple interactive chat. And I also see it is expecting <conversation_id>

Thanks, MO

hey @reddimohan you can check this

Rasa_CustomUI-v_2.0/script.js at 525d9b4219a420f1947ec656123d981f0da6ffb3 ¡ JiteshGaikwad/Rasa_CustomUI-v_2.0 ¡ GitHub

hey @reddimohan you can read more about the webhook here:

Custom Connectors

@reddimohan here are the HTTP API docs

Thanks, @erohmensing, @JiteshGaikwad for the links.