I started rasa as an http server in one of the terminal before this using rasa run -m models --enable-api --cors “*” --debug.
The above data is just for testing and i have all the files including domain.yml file.
But i’m getting this warnings
/rasaaa/lib/python3.7/site-packages/rasa/utils/common.py:351: UserWarning: Loading domain from ‘/tmp/tmp1ns5z1bz/domain.yml’ failed. Using empty domain. Error: ‘The provided yaml file is invalid. You can use http://www.yamllint.com/ to validate the yaml syntax of your file.’
Core training was skipped because no valid domain file was found. Only an nlu-model was created.Please specify a valid domain using ‘–domain’ argument or check if the provided domain file exists.
Am i making some mistake? How can i train rasa using curl ? also is there any way i can directly add a new intent using any api endpoint?
I’m using rasa 1.10.3.
I took the domain I wanted and then simply replaced with \n to get a single line (string).
I was thinking about this a while back and it would be nice to have a POJO (DAO type) object to use when building these to make sure it comes out syntactically correct when using API calls (granted I was using Python to make the call).
Other than the typos I see it should work as you are making the call the same way I am (headers/etc).
Hi Jason , Thanks for replying . I didn’t actually get what you modified to make it working .can you do some modification in the command i ran above to make me understand?
Yes there may be many typos as I’m just trying to train model this way and just testing it with some random input.
this should work: (it is the base rasa init model), use the following as a single line. [HINT: spacing matters tremendously and you have to double the single quotes inside a string (double quotes)]
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: LexicalSyntacticFeaturizer\n - name: CountVectorsFeaturizer\n - name: CountVectorsFeaturizer\n analyzer: “char_wb”\n min_ngram: 1\n max_ngram: 4\n - name: DIETClassifier\n epochs: 100\n - name: EntitySynonymMapper\n - name: ResponseSelector\n epochs: 100\npolicies:\n - name: MemoizationPolicy\n - name: TEDPolicy\n max_history: 1\n epochs: 100\n - name: MappingPolicy\n\n”, “nlu”: "## intent:greet\n- hey\n- hello\n- hi\n- good morning\n- good evening\n- hey there\n\n## intent:goodbye\n- bye\n- goodbye\n- see you around\n- see you later\n\n## intent:affirm\n- yes\n- indeed\n- of course\n- that sounds good\n- correct\n\n## intent:deny\n- no\n- never\n- I don’‘t think so\n- don’‘t like that\n- no way\n- not really\n\n## intent:mood_great\n- perfect\n- very good\n- great\n- amazing\n- wonderful\n- I am feeling very good\n- I am great\n- I’‘m good\n\n## intent:mood_unhappy\n- sad\n- very sad\n- unhappy\n- bad\n- very bad\n- awful\n- terrible\n- not very good\n- extremely sad\n- so sad\n\n## intent:bot_challenge\n- are you a bot?\n- are you a human?\n- am I talking to a bot?\n- am I talking to a human?\n", “stories”: “## 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 - utter_did_that_help\n* affirm\n - utter_happy\n\n## sad path 2\n* greet\n - utter_greet\n* mood_unhappy\n - utter_cheer_up\n - utter_did_that_help\n* deny\n - utter_goodbye\n\n## say goodbye\n* goodbye\n - utter_goodbye\n\n## bot challenge\n* bot_challenge\n - utter_iamabot\n”, “domain”: “intents:\n - greet\n - goodbye\n - affirm\n - deny\n - mood_great\n - mood_unhappy\n - bot_challenge\n\nresponses:\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\n utter_iamabot:\n - text: “I am a bot, powered by Rasa.”\n\nsession_config:\n session_expiration_time: 60\n carry_over_slots_to_new_session: true\n”, “out”: “models”, “force”: true }’
Hi ! I was wondering if we can give the path of the files in .md/.json/.yml format instead of giving the data in the format discussed above as plain string. is that possible?