Skip to content
Discussion options

You must be logged in to vote

Your config is using topical/dialog rails but you want to use it as input rails. Currently this is not possible.
Input rails should use actions to check content, not define user patterns:

  define flow detect political content
    $is_political = execute check_political_content
    if $is_political
      bot warn political
      stop

  define bot warn political
    "Let's keep this conversation away from politics, please."

with a python action, for example:

  async def check_political_content(context: dict):
      user_message = context.get("user_message", "").lower()
      keywords = ["politics", "vote", "government"]
      return any(keyword in user_message for keyword in keywords)

yo…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mu-fazil-vk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants