Extending REST API for administration purpose

Hello,

I discovered Rasa Stack a few days ago and I’m currently thinking about the best way of managing a production rasa-stack. The end users won’t be developers and therefore will need a very simple UI with no shell commands. We are planning to develop such an UI and we would need more HTTP endpoints for common use cases (e.g. training a model and downloading it through REST endpoint, gathering metrics about the rasa-core usage…). Do you plan to add such endpoints anytime soon or should I work on it and if I do so, what’s the best way to do this ?

Thanks for your help, Jean-Yves

update: I found the POST /jobs endpoint which is one of the endpoints I was looking for.

update2: I can’t find a way to make it work :confounded: Has somebody already managed to use this endpoint ? The example doesn’t work either

Here’s the data I’m trying to send over HTTP:

{ “config”: “language: en\npipeline: supervised_embeddings\npolicies:\n - name: KerasPolicy\n epochs: 100\n max_history: 5\n - name: FallbackPolicy\n fallback_action_name: ‘action_default_fallback’\n - name: MemoizationPolicy\n max_history: 5\n - name: FormPolicy\n - name: MappingPolicy\n”, “domain” : “intents:\n - greet\n - goodbye\n - mood_affirm\n - mood_deny\n - mood_great\n - mood_unhappy\n\nactions:\n- utter_greet\n- utter_cheer_up\n- utter_did_that_help\n- utter_happy\n- utter_goodbye\n\ntemplates:\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", “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:mood_affirm\n- yes\n- indeed\n- of course\n- that sounds good\n- correct\n\n## intent:mood_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”, “stories” : “## happy path \n* greet \n - utter_greet \n* mood_great \n - utter_happy \n - action_restart \n \n## sad path 1 \n* greet \n - utter_greet \n* mood_unhappy \n - utter_cheer_up \n - utter_did_that_help \n* mood_affirm \n - utter_happy \n - action_restart \n \n## sad path 2 \n* greet \n - utter_greet \n* mood_unhappy \n - utter_cheer_up \n - utter_did_that_help \n* mood_deny \n - utter_goodbye \n - action_restart \n \n## say goodbye \n* goodbye \n - utter_goodbye \n - action_restart \n”, “force”:true }

and the rasa core logs :

Processed Story Blocks: 0it [00:00, ?it/s] rasa_core_1 | 2019-04-24 16:16:45 WARNING rasa.core.training.generator - There is no starting story block in the training data. All your story blocks start with some checkpoint. There should be at least one story block that starts without any checkpoint. rasa_core_1 | 2019-04-24 16:16:45 INFO rasa.core.policies.ensemble - Skipped training, because there are no training samples. rasa_core_1 | 2019-04-24 16:16:45 INFO rasa.core.agent - Persisted model to ‘/tmp/tmp15g66fx5/core’ rasa_core_1 | 2019-04-24 16:16:45 INFO rasa_nlu.training_data.training_data - Training data stats: rasa_core_1 | - intent examples: 0 (0 distinct intents) rasa_core_1 | - Found intents: rasa_core_1 | - entity examples: 0 (0 distinct entities) rasa_core_1 | - found entities: rasa_core_1 | rasa_core_1 | 2019-04-24 16:16:45 INFO rasa_nlu.model - Starting to train component WhitespaceTokenizer rasa_core_1 | 2019-04-24 16:16:45 INFO rasa_nlu.model - Finished training component. rasa_core_1 | 2019-04-24 16:16:45 INFO rasa_nlu.model - Starting to train component RegexFeaturizer rasa_core_1 | 2019-04-24 16:16:45 INFO rasa_nlu.model - Finished training component. rasa_core_1 | 2019-04-24 16:16:45 INFO rasa_nlu.model - Starting to train component CRFEntityExtractor rasa_core_1 | 2019-04-24 16:16:45 INFO rasa_nlu.model - Finished training component. rasa_core_1 | 2019-04-24 16:16:45 INFO rasa_nlu.model - Starting to train component EntitySynonymMapper rasa_core_1 | 2019-04-24 16:16:45 INFO rasa_nlu.model - Finished training component. rasa_core_1 | 2019-04-24 16:16:45 INFO rasa_nlu.model - Starting to train component CountVectorsFeaturizer rasa_core_1 | 2019-04-24 16:16:45 INFO rasa_nlu.model - Finished training component. rasa_core_1 | 2019-04-24 16:16:45 INFO rasa_nlu.model - Starting to train component EmbeddingIntentClassifier rasa_core_1 | 2019-04-24 16:16:45 ERROR rasa_nlu.classifiers.embedding_intent_classifier - Can not train an intent classifier. Need at least 2 different classes. Skipping training of intent classifier. rasa_core_1 | 2019-04-24 16:16:45 INFO rasa_nlu.model - Finished training component. rasa_core_1 | 2019-04-24 16:16:45 INFO rasa_nlu.model - Successfully saved model into ‘/tmp/tmp15g66fx5/nlu’

I opened an issue on Github : POST /jobs doesn't work · Issue #3317 · RasaHQ/rasa · GitHub