Train a Rasa model - swagger not displaying correctly

Hi,

I am trying to Train a Rasa model using the HTTP /train endpoint as documented here: http://rasa.com/docs/rasa/api/http-api/#tag/Model

I am not sure what to pass in as the JSON Body to the request though as Swagger or OpenAPI is not showing correctly. It is just displaying the Schema references rather than the actual JSON body.

“$ref”: “#/components/examples/TrainingRequest”

Can anybody fix this please?

Many thanks, Liz

We are working on a fix. Thanks, for pointing it out.

In the meantime, here is the definition of the TrainingRequest:

08

If you want to train a combined Rasa model, you need to provide the content of the domain file and the config file in the request. Additionally, the training data should be in the request body. Optionally, you can also specify the output directory and a boolean indicating whether you want to force training or not.

Here is an example request:

curl -X POST \
  http://localhost:5005/model/train \
  -d '{
    "config": "language: en\npipeline: supervised_embeddings\npolicies:\n  - name: MemoizationPolicy\n  - name: KerasPolicy",
    "domain": "intents:\n  - greet\n  - goodbye\n  - mood_affirm\n  - mood_deny\n  - mood_great\n  - mood_unhappy\nactions:\n  - utter_greet\n  - utter_cheer_up\n  - utter_did_that_help\n  - utter_happy\n  - utter_goodbye\ntemplates:\n  utter_greet:\n  - text: \"Hey! How are you?\"\n  utter_cheer_up:\n  - text: \"Here is something to cheer you up:\"\n  image: \"https://i.imgur.com/nGF1K8f.jpg\"\n  utter_did_that_help:\n  - text: \"Did that help you?\"\n  utter_happy:\n  - text: \"Great carry on!\"\n  utter_goodbye:\n  - text: \"Bye\"",
    "nlu": "## intent:greet\n  - hey\n  - hello\n## intent:goodbye\n  - cu\n  - good bye",
    "stories": "## happy path\n* greet\n  - utter_greet\n* mood_great\n  - utter_happy\n## sad path\n* greet\n  - utter_greet\n* mood_unhappy",
    "out": "models",
    "force": false
}'

@Tanja this is exactly what I needed, thank you very much!