Skip to content
This repository was archived by the owner on Jun 26, 2025. It is now read-only.
This repository was archived by the owner on Jun 26, 2025. It is now read-only.

Using pre #131

Open
Open

Description

@valgaze

Hi there--

DialogFlow is definitely a "team sport" and one of the best parts is being able to come across libraries/tooling like this one!

Question: If one uses flask-assistant to implement a conversation flow with a yes/no branch, is there any existing pattern with this library to integrate DialogFlow's "pre-defined" intents?

Only reason to do this is because the pre-defined intents come "for free" w/ many excellent natural language samples for negative (this is page 1/5):

image

I'm presuming the answer is no, but curious if this has come up before

Ex. in the pizza-shop sample, there's a check for no by inspecting if the letter n exists (which is probably pretty good match for English-speaking commerce case):
https://github.com/treethought/flask-assistant/blob/master/samples/pizza_contexts/agent.py#L37

image

Activity

  1. treethought commented on Apr 13, 2020

    @treethought
    Owner

    Hi @valgaze. To use these "pre-defined" followup intents with flask-assistant, you can simply enable webhook for the intent.
    Given, a "parent" intent Sample-Intent that has yes and no followup intents Sample-Intent-Yes and Sample-Intent-No, you can implement action functions for all three as usual.

    ...
    @assist.action("Sample-Intent")
    def parent_intent_logic():
        pass
    
    @assist.action("Sample-Intent-Yes")
    def logic_for_yes():
        pass
    
    @assist.action("Sample-Intent-No")
    def logic_for_no():
        pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions