cofacts/rumors-line-bot

Consult rule / example based agents (Dialogflow) before looking up text in database

MrOrz opened this issue · 0 comments

MrOrz commented

As-is

Currently for some common interactions like "Hello", "Hi", or "Thanks", we need to create an article and reply to teach users to use Cofacts lookup feature correctly.

image

To-be

We can integrate rule / example based agents for such interaction. More specifically,

  • We can build rule-based agents using Dialogflow, specifying examples and sample responses there.
  • When we detect new messages here (or in initState handler), we first consult rule-based agents
    • If the agent returns fallback, proceed to ListArticles rumors-api call as before
    • If the agent returns a preset response, use the response directly.