How to train rasa model using rasa api?

curl -X POST http://localhost:5005/model/train -H ‘Accept-Encoding: gzip, deflate’ -H ‘Content-Type: application/json’ -d ‘{ “config”: “language: en\npipeline:\n - name: WhitespaceTokenizer\n - name: RegexFeaturizer\n - name: CRFEntityExtractor\n - name: EntitySynonymMapper\n - name: CountVectorsFeaturizer\n - name: EmbeddingIntentClassifier\npolicies:\n - name: MemoizationPolicy\n - name: KerasPolicy\n - name: MappingPolicy\n - name: FormPolicy\n”, “nlu”: “## intent:new_intent_to_train_on\n - new_utter_to_train_on for new_entity_to_train_on_value\n - new_utter_to_train_on for new_entity_to_train_on_value\n## intent:greet\n - hey\n - hello\n## intent:goodbye\n - cu\n - goodbye\n## intent:mood_great\n - Great!!\n - happy\n## intent:mood_unhappy\n - sad\n - Terrible”, “stories”: “##new_intent_to_train_on Path from model train without utter_slot_values\n* greet\n - utter_greet\n* new_intent_to_train_on\n - new_intent_to_train_on_form\n - form{“name”: “new_intent_to_train_on_form”}\n - form{“name”: null}\n\n## happy path\n * greet\n - utter_greet\n* mood_great\n - utter_happy\n\n## sad path 1\n * greet\n - utter_greet\n* mood_unhappy\n - utter_cheer_up\n”, “domain”: “entities:\n - new_entity_to_train_on\nintents:\n - new_intent_to_train_on\n - greet\n - goodbye\n - affirm\n - deny\n - mood_great\n - mood_unhappy\n\nactions:\n - utter_slots_values\n - utter_greet\n - utter_cheer_up\n - utter_did_that_help\n - utter_happy\n - utter_goodbye\ntemplates:\n utter_slots_values:\n - text: new_utter_output_to_send:\n\n- new_entity_to_train_message_values : {new_entity_to_train_on}\n\n\n utter_greet:\n - text: Hey! How are you?\n\n utter_cheer_up:\n - text: Here is something to cheer you up:\n image: https://i.imgur.com/nGF1K8f.jpg\n\n utter_did_that_help:\n - text: Did that help you?\n\n utter_happy:\n - text: Great carry on!\n\n utter_goodbye:\n - text: Bye\n\nforms:\n - new_intent_to_train_on_form\nslots:\n new_entity_to_train_on:\n type: unfeaturized\n auto_fill: false”, “out”: “models”, “force”: true }’

Instead of full data of config, nlu, domain, stories how can we pass the only path of body?

Ex: { “config”:“config.yml”, “nlu”:“data\nlu.md”, “stories”:“data\stories.md”, “domain”:“domain.yml”, “out”:“models”, “force”:true }

But it is not working so can you please help me asap.

Hi, this is not a question about the Rasa API but about how to use curl. The curl manpage has a section about -d that explains how to post data from a file using @.

Hi

I’m trying to hit rasa model/train post api using postman but its not working while passing the nlu.md, domain.yml, config.yml and stories.md file path as body in postman.

I just want to know how Rasa X console is working while we click on train button then how it’s taking all the above mentioned file data as body and how after clicking on train button it automatically training the model internally?

I’m trying to implement a button into my own console page to train my rasa model Please anyone of you help me on this ASAP