buerokratt / Training-Module

MIT License
2 stars 21 forks source link

REST service to update an existing Rasa response #93

Open turnerrainer opened 1 year ago

turnerrainer commented 1 year ago

AS AN Architect I WANT to have a REST service to update an existing Rasa response SO THAT there wouldn't be duplicate services for it

Acceptance Criteria

Temporary list of endpoints - https://github.com/buerokratt/Buerokratt-onboarding/issues/8 Proto to add new Rasa responses

Example

Existing domain.yml

responses:
  utter_andmekaitse_küsimused:
  - text: "kõik on kaitstud"

  utter_fallback_kontroll:
  - text: "Jäi arusaamatuks, kas soovisite, et suunan edasi?"

Request to change utter_andmekaitse_küsimused to kõik on kaitstud!

responses:
  utter_andmekaitse_küsimused:
  - text: "kõik on kaitstud!"

  utter_fallback_kontroll:
  - text: "Jäi arusaamatuks, kas soovisite, et suunan edasi?"
RaulAltmae commented 1 year ago

sample input for /rasa/responses/update

{
  "response_name": "utter_common_teenus_ilm",
  "response": {
    "utter_common_teenus_ilm": [
      {
        "condition": [
          {
            "type": "slot",
            "name": "common_teenus_ilm_asukoht",
            "value": null
          }
        ],
        "text": "Hetkel oskan ma öelda ilma Eesti raames piirkonnapõhiselt. Palun sisestage korrektne piirkonna nimi."
      },
      {
        "text": "#weather; {common_teenus_ilm_asukoht};"
      }
    ]
  }
}
turnerrainer commented 1 year ago

@RaulAltmae please link this issue with an appropriate pull request.

RaulAltmae commented 1 year ago

Pull request https://github.com/buerokratt/Training-Module/pull/169

turnerrainer commented 1 year ago

Blocked due to #289

rasmusei commented 8 months ago

https://github.com/buerokratt/Training-Module/issues/289 is done

Kristjan259 commented 8 months ago

Work most of the time. Sometimes however it does not refresh the response right away when you have updated it and you have refresh the page, and then it is changed.