Skip to content

Commit

Permalink
Use search text to select response matches
Browse files Browse the repository at this point in the history
  • Loading branch information
gunthercox committed Nov 19, 2018
1 parent ad29528 commit 5f983f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chatterbot/logic/best_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def process(self, input_statement):
# Select the closest match to the input statement
closest_match = self.get(input_statement)
self.chatbot.logger.info('Using "{}" as a close match to "{}"'.format(
input_statement.text, closest_match.text
closest_match.text, input_statement.text
))

recent_repeated_responses = filters.get_recent_repeated_responses(
Expand All @@ -56,7 +56,7 @@ def process(self, input_statement):

# Get all statements that are in response to the closest match
response_list = self.chatbot.storage.filter(
in_response_to=closest_match.text,
search_in_response_to=closest_match.search_text,
exclude_text=recent_repeated_responses
)

Expand Down

0 comments on commit 5f983f7

Please sign in to comment.