Skip to content

Implemented search_in_response_to - #1676

Open
iamhssingh wants to merge 3 commits into
gunthercox:masterfrom
101Loop:master
Open

iamhssingh wants to merge 3 commits into
gunthercox:masterfrom
101Loop:master

Conversation

@iamhssingh

Copy link
Copy Markdown

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`.
Comment thread chatterbot/chatterbot.py
Comment thread chatterbot/chatterbot.py
Logger statement was removed in the earlier commit by mistake

@iamhssingh iamhssingh left a comment

Copy link
Copy Markdown
Author

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

Comment thread chatterbot/chatterbot.py
Comment thread chatterbot/chatterbot.py
@iamhssingh

Copy link
Copy Markdown
Author

@gunthercox anything here expected of me?

@gunthercox

Copy link
Copy Markdown
Owner

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

@gunthercox

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

This branch has not been deployed

No deployments
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