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

Implemented search_in_response_to #1676

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

iamhssingh
Copy link

Implemented the concept of search_in_response_to in learn_reposne. If previous_statement is an instance of chatterbot.conversation.Statement, learning will save previous_statement.search_text as statement.search_in_response_to.

Implemented the concept of `search_in_response_to` in `learn_reposne`. If `previous_statement` is an instance of `chatterbot.conversation.Statement`, learning will save `previous_statement.search_text` as `statement.search_in_response_to`.
Logger statement was removed in the earlier commit by mistake
Copy link
Author

@iamhssingh iamhssingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added logger statement, as pointed by @gunthercox

chatterbot/chatterbot.py Show resolved Hide resolved
@iamhssingh
Copy link
Author

@gunthercox anything here expected of me?

@gunthercox
Copy link
Owner

@iamhssingh Sorry about the wait, these changes look good and I'll merge them in shortly.

@gunthercox
Copy link
Owner

Actually, I just realized that this is missing unit tests. Is there any additional tests cases that can be added to cover these changes?

@iamhssingh
Copy link
Author

@gunthercox Sure. I see this change has yet not been implemented. I will write the test cases & update the commit. I am sorry for being this late, bad times!

@iamhssingh
Copy link
Author

@gunthercox Are you using in_response_to to search for an answer? Is there any specific logic adapter for that?

Here's the expected behavior of this logic adapter:
Say, I have a Statement having text = "Hi" and in_response_to = "Hello".

User: Hello
Bot: Hi # Found directly by searching Statement where in_response_to is Hello

* Fixed doc string
* Restructured example to provide more beautiful example
@iamhssingh
Copy link
Author

Actually, I just realized that this is missing unit tests. Is there any additional tests cases that can be added to cover these changes?

The test cases that are already there takes care of current implementation as well.

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

Successfully merging this pull request may close these issues.

2 participants