paschmann / rasa-ui

Rasa UI is a frontend for the Rasa Framework
MIT License
957 stars 329 forks source link

How to use duckling as pipeline in rasa-ui #171

Closed creative-common closed 5 years ago

creative-common commented 5 years ago

Hello,

@pradeepmvn

How can we use the duckling inside the rasa_ui along with other pipeline template such as spacy_sklearn or tensorflow_embedding ?

Thanks

JoshuaZe commented 5 years ago

well, it is better to enable custom pipelines support. not sure whether latest version rasa_ui support compact json for NLU Pipeline Template field like [{"name":"nlp_spacy"},{"name":"ner_crf"},{"name":"ner_synonyms"}]

JoshuaZe commented 5 years ago

looks the custom pipelines feature is not supported in Rasa UI, so i made some modifications

in the official Rasa Doc about Training Http API, it said that "The request should always be sent as application/x-yml regardless of wether you use json or md for the data format. Do not send json as application/json for example." However, i tried the application/json with json format like below, and have a successful return.

{
  "language":"zh",
  "pipeline":[{"name":"tokenizer_jieba"},{"name":"ner_crf"},{"name":"ner_synonyms"},{"name":"intent_featurizer_count_vectors"},{"name":"intent_classifier_tensorflow_embedding"}],
  "data":{
         "rasa_nlu_data":{
                 "common_examples":[...]
          }
    }
}

the NLU version that i used:

{
    "version": "0.14.3",
    "minimum_compatible_version": "0.13.0a2"
}

i am not a JS guy, but i can create a pull request for reviewing if we need to enable this feature. :)

creative-common commented 5 years ago

I think this is one of the essential feature, @pradeepmvn what you think. @JoshuaZe You should create a pull request if its working I hope pradeep will surely add it.

Thanks!

pradeepmvn commented 5 years ago

@JoshuaZe please feel free to submit a PR. This will also need a ui change to display it as a text area. Thanks.

JoshuaZe commented 5 years ago

just submit a PR. i am not familiar with UI, and it looks like already a text area ?

creative-common commented 5 years ago

@JoshuaZe no problem I will take care of it.

JoshuaZe commented 5 years ago

@sanjeethanspal Thank you!