dariowho/intents

Implement "followup" member in Intent class

dariowho opened this issue · 0 comments

AS A chatbot user
I WANT Agent to recognize followup utterances and deal with them accordingly
SO THAT I can have richer multi-turn interactions

Details

Currently Intents supports Dialogflow-style context tags in Intent subclasses. The idea is to make it more abstract and easier to define follow-up intents, by defining Intent members within an Intent class:

class buy_fish(Intent):
    """
    User: I want to buy one fish
    """
    amount: Sys.Integer = 1

class change_amount(Intent):
    """
    User: Actually, let's make it 2
    """
    parent_order: buy_fish = follow()
    
    amount: Sys.Integer

Through parent_order it's possible to manage conversation flow, as well as access the conversation context in a more abstract and elegant way.

Test Cases

tbd