-
Notifications
You must be signed in to change notification settings - Fork 209
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
Topic switch does not work during coversation #375
Comments
Interesting, So I think what is happening here is that the conversation simply isn't working because There are some work arounds for this. I didn't test this but it should work.
Here is another example, using
|
Thanks @silentrob . I tried both options, and neither of them seem to work. The output is like below; Bot> Hi, How can I help you? I also attached the debug output. I think after first reply, the topic correctly gets set to "pets". However in the second request, it goes back to "random". |
Can you please help me to get out of this issue. In my bot, each conversation starts with the same reply. Meaning, the first reply would be "What is your favorite", and the subsequent conversation varies based on what the user said like "I love pets|animals|zoo". So, it is very important for me to switch to a right topic after I get the response from user. The only workaround for me is to ask the same question differently. Like; "what is your favorite" and "what is the favorite". But, the option on that is very limited, and I am potentially looking at atleast 100 topics. If there is a patch, I can try. Or, if someone give a pointer on where to look for potential fix, I can check that too. |
I think the issue is with matching the conversation. I removed the
and here is the conversation. You> I love pets The following text from the documentation has some clue. Is it possible that when we search for previous reply, we get outside the context of topic?
|
I finally made it work. I am not sure if this is workaround or a fix. The fix is to add a topic field to the gambit model, and during the match when there are multiple matches for a conversation gambit, use the one that belongs to the user's current topic. These are the changes;
If this sounds like an appropriate fix, please let me know and I can create a pull request. I ran "npm test" with this change, and the results are same (157 passing, 7 pending). |
…uld remain in the current topic
…uld remain in the current topic
When the topic is switched, and the first gambit is a conversation, it always matches the first topic, rather than switched topic. Consider the following gambits.
and
Expected Behavior
The first one works as expected. The conversation is as follows.
Bot> Hi, How can I help you?
You> i love pets
Bot> Me too
You> my favorite is cats
Bot> cats are fun!!
For the second one, it always matches the "animals" topic. It should say "cats are fun!!" as a last reply. The conversation is as follows.
Bot> Hi, How can I help you?
You> I love pets
Bot> Me too, what is your favorite?
You> cats
Bot> cats are scary
Current Behavior
The topic switch doesn't happen, and it matches the first one irrespective of topic, instead of matching the current topic, which is "pets"
Steps to Reproduce (for bugs)
Try out the two sets of Gambits.
Context
We are creating a chatops, where the first question asks for environment, the rest of the conversation depends on the first question, that determines the topic.
Your Environment
The text was updated successfully, but these errors were encountered: