buerokratt / Service-Module

0 stars 11 forks source link

Rasa API commands #88

Open turnerrainer opened 1 year ago

turnerrainer commented 1 year ago

AS A Developer I WANT TO use all necessary Rasa functionalities within this project as REST API calls SO THAT there wouldn't be a need to execute .sh scripts or similar

KlviG commented 1 year ago

To trigger intent: curl -H "Content-ion/json" -X POST -d '{"name": "intent_name"}' "http://url:5005/conversations/5005/trigger_intent"

To send message for intent recognition: curl -H "Content-ion/json" -X POST -d '{"text": "text_to_send","sender": "user"}' "http://url:5005/conversations/5005/messages"

To train new model: curl -XPOST url/model/train -H 'Accept-Encoding: gzip, deflate' --header 'Content-Type: text/x-yaml' --data drops newlines --data-binary @path_to_bot_file NOTE: to train model with that command, all training data needs to be included in "path_to_bot_file" including domain.yml, config.yml, nlu files etc.

KlviG commented 1 year ago

All available rasa API endpoints include:

/conversations//messages - POST - add_message /conversations//tracker/events - POST - append_events /webhooks/rest - GET - custom_webhook_CmdlineInput.health /webhooks/rest/webhook - POST - custom_webhook_CmdlineInput.receive /model/test/intents - POST - evaluate_intents /model/test/stories - POST - evaluate_stories /conversations//execute - POST - execute_action /domain - GET - get_domain / - GET - hello /model - PUT - load_model /model/parse - POST - parse /conversations//predict - POST - predict /conversations//tracker/events - PUT - replace_events /conversations//story - GET - retrieve_story /conversations//tracker - GET - retrieve_tracker /status - GET - status /model/predict - POST - tracker_predict /model/train - POST - train /conversations//trigger_intent - POST - trigger_intent /model - DELETE - unload_model /version - GET - version

SigritSiht commented 1 year ago

@turnerrainer Georg has added his comments, is this done now?