Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruuter DSL to launch services based on intents #477

Closed
17 tasks
turnerrainer opened this issue Apr 2, 2024 · 1 comment · Fixed by #480
Closed
17 tasks

Ruuter DSL to launch services based on intents #477

turnerrainer opened this issue Apr 2, 2024 · 1 comment · Fixed by #480
Assignees
Labels

Comments

@turnerrainer
Copy link
Contributor

turnerrainer commented Apr 2, 2024

AS A Product Owner
I WANT Services to be launched based on detected intents if they exist
SO THAT End Clients could use (gov) e-services where via chat when applicable

Acceptance Criteria

  • Add an additional step to Ruuter DSL to validate from an approriate Postgres database if Rasa response has a matching Service
  • Keep all other functionalities as they are right now

Scope

Prerequisites

Intended workflow nr. 1

  • The End Client sends a message "Tere" ("Hello" in Estonian)
  • Ruuter sends the request AS IS to Rasa, which responds with "Kuidas saan abiks olla?"
  • Ruuter does not detect # as the first character of Rasa's response, so passes the response AS IS to the End Client

Intended workflow nr. 2

  • The End Client sends a message "Ilm Tallinnas" ("What's the weather like in Tallinn" in Estonian)
  • Ruuter sends the request AS IS to Rasa, which responds with "#weather; Tallinn;"
  • Ruuter detects # as the first character of Rasa's response, so passes weather to Postgres to validate if there's a matching Services linked to it
  • If a matching Service exists, it will be triggered by Ruuter as a standard REST call to an external endpoint
  • The response received from the external endpoint is added to Bürokratt's Chat database

Intended workflow nr. 2

  • The End Client sends a message "Ilm Tallinnas" ("What's the weather like in Tallinn" in Estonian)
  • Ruuter sends the request AS IS to Rasa, which responds with "#weather; Tallinn;"
  • Ruuter detects # as the first character of Rasa's response, so passes weather to Postgres to validate if there's a matching Services linked to it
  • If a matching Service does not exist, a response indicating that the Service is currently unavailable is sent as a predefined i18s key called service_currently_unavailable
@turnerrainer turnerrainer converted this from a draft issue Apr 2, 2024
@turnerrainer turnerrainer added this to the Chatbot 2.0.0 code freeze milestone Apr 2, 2024
@KlviG
Copy link
Collaborator

KlviG commented Apr 11, 2024

checkservice:
  switch:
    - condition: ${incoming.body.list[0] === "#weather"}
      next: weatherService
    - condition: ${incoming.body.list[0] == null}
      next: noService
  next: noService

weatherService:
  call: http.post
  args:
    url: https://ruuter.buerokratt.something.ee/get-things
    body:
     locationName: ${incoming.body.list[1]}
     chatId: ${incoming.body.chatId}
     authorId: ${incoming.body.authorId}
  result: weatherRequest
  next: end

noService:
  return: "${incoming.body.list[0]} , NO_SERVICE"
  status: 400
  next: end

@turnerrainer turnerrainer moved this from To Groom to In Progress in Bürokratt Sprint Apr 11, 2024
@turnerrainer turnerrainer linked a pull request Apr 16, 2024 that will close this issue
@turnerrainer turnerrainer moved this from In Progress to In Review in Bürokratt Sprint Apr 16, 2024
@turnerrainer turnerrainer assigned 1AhmedYasser and unassigned baha-a Apr 16, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in Bürokratt Sprint Apr 18, 2024
@turnerrainer turnerrainer moved this from Done to To Deploy in Bürokratt Sprint Apr 18, 2024
@rasmusei rasmusei moved this from To Deploy to Acceptance Testing in Bürokratt Sprint May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Acceptance Testing
Development

Successfully merging a pull request may close this issue.

4 participants