Skip to content

Commit

Permalink
bug fix: Fix errors in "john" bot in contrib_bots.
Browse files Browse the repository at this point in the history
Fix outdated code in "john.py" to use "OutputAdapter" module
in Chatterbot. Typecast Chatterbot response to string.
  • Loading branch information
abhijeetkaur authored and showell committed Feb 10, 2017
1 parent 87e8d90 commit b22e9a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib_bots/bots/john/john.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def create_chat_bot(no_learn):
"response_selection_method": "chatterbot.response_selection.get_random_response",
"statement_comparison_function": "chatterbot.comparisons.levenshtein_distance"
}],
output_adapter="chatterbot.output.OutputFormatAdapter",
output_adapter="chatterbot.output.OutputAdapter",
output_format='text',
database=DATABASE_PATH,
silence_performance_warning="True",
Expand Down Expand Up @@ -124,7 +124,7 @@ def handle_message(self, message, client, state_handler):
type='stream',
to='VirtualHelp',
subject="John",
content=bota.get_response(original_content)
content=str(bota.get_response(original_content))
))

handler_class = JohnHandler

0 comments on commit b22e9a0

Please sign in to comment.