Rasa 2.0 - API /model/train doesn't work

Hi @mbukovy, it appears our documentation is in need of an update to match the YAML spec.

You can use the /model/train endpoint with YAML by setting the request header’s Content-Type to application/x-yaml. Inside the request body, you’ll pass in a single YAML formatted string containing the configuration, domain definitions, and training data.

For example:

stories:
- story: My story
  steps:
  - intent: greet
  - action: utter_greet

rules:
- rule: My rule
  steps:
  - intent: greet
  - action: utter_greet

intents:
- greet

nlu:
- intent: greet
  examples: |
   - hi
   - hello
- intent: bye
  examples: |
   - goodbye
   - bye

responses:
  utter_greet:
  - text: Hi

language: en

polices:
   - name: RulePolicy

pipeline:
   - name: WhitespaceTokenizer
   - name: CountVectorsFeaturizer
   - name: DucklingHTTPExtractor
   - name: DIETClassifier
     epochs: 1
1 Like