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

Make it possible to jump between conversation steps #13

Open
johkin opened this issue Sep 1, 2016 · 4 comments
Open

Make it possible to jump between conversation steps #13

johkin opened this issue Sep 1, 2016 · 4 comments
Assignees

Comments

@johkin
Copy link

johkin commented Sep 1, 2016

In the current solution it's not possible to skip a step in a conversation.

Maybe there could be a new method nextConversation(event, "confirmBooking"), which could create a conversationQueue "on-the-fly". This would make it possible to change the flow of a conversation depending on the input from the user.

That could perhaps remove the need for startConversation(event) and stopConversation(event) and also the next-attribute in the annotation?

@rampatra rampatra self-assigned this Sep 3, 2016
@rampatra
Copy link
Owner

rampatra commented Sep 8, 2016

Hi,

Can you give a particular use case where you need to skip conversation to get the work done easily which would be instead cumbersome with the existing framework?

@johkin
Copy link
Author

johkin commented Sep 8, 2016

If you have a story with two or more branches, it would be nice if you could jump to the branch depending on the input.
I've been tinkering with jbot to create a time reporting bot, and when handling illness my story has at least two branches. The branches can't be handled by the backing queue, it would then require a graph for the conversation steps.

@rampatra
Copy link
Owner

rampatra commented Sep 24, 2016

@johkin You may be right about jumping between conversation steps but I think your problem will be solvable with the existing queue as well. You can mention your conversation steps here and I can try to help.

For example, let's say you have a food ordering bot and the 2 branches according to you can be:

  1. User ordered pizza -> pizza size -> flavour -> quantity
  2. User ordered burger -> chicken/beef/pork burger -> quantity

Or you can have 1 branch as (with the existing conversation queue structure):

  1. Take order (pizza or burger) -> If pizza ask size & flavour and if burger ask type -> quantity

@johkin
Copy link
Author

johkin commented Oct 6, 2016

In my current example I'm trying to build a time-reporting bot, and the first case I've looked into is handling sickness.

Client: I'm feeling ill.
Bot: Are you ill?
Client: Yes/No
if (no) {
Bot: Oh, I misunderstood! [End conversation]
} else {
Bot: Have you been ill all day?
Client: Yes/No
if (yes) {
Bot: Noted! [End conversation]
} else {
Bot: How long have you been ill?
Client: Half day
Bot: Ok, noted. Get well! [End conversation]
}
}

This conversation can probably be refactored to something using the queue, but after looking at "wit.ai" which now supports branching it seems like a natural thing to support a graph instead of a queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants