mirror of https://github.com/zulip/zulip.git
bug fix: Fix errors in "john" bot in contrib_bots.
Fix outdated code in "john.py" to use "OutputAdapter" module in Chatterbot. Typecast Chatterbot response to string.
This commit is contained in:
parent
87e8d9036f
commit
b22e9a0dbf
|
@ -38,7 +38,7 @@ def create_chat_bot(no_learn):
|
||||||
"response_selection_method": "chatterbot.response_selection.get_random_response",
|
"response_selection_method": "chatterbot.response_selection.get_random_response",
|
||||||
"statement_comparison_function": "chatterbot.comparisons.levenshtein_distance"
|
"statement_comparison_function": "chatterbot.comparisons.levenshtein_distance"
|
||||||
}],
|
}],
|
||||||
output_adapter="chatterbot.output.OutputFormatAdapter",
|
output_adapter="chatterbot.output.OutputAdapter",
|
||||||
output_format='text',
|
output_format='text',
|
||||||
database=DATABASE_PATH,
|
database=DATABASE_PATH,
|
||||||
silence_performance_warning="True",
|
silence_performance_warning="True",
|
||||||
|
@ -124,7 +124,7 @@ class JohnHandler(object):
|
||||||
type='stream',
|
type='stream',
|
||||||
to='VirtualHelp',
|
to='VirtualHelp',
|
||||||
subject="John",
|
subject="John",
|
||||||
content=bota.get_response(original_content)
|
content=str(bota.get_response(original_content))
|
||||||
))
|
))
|
||||||
|
|
||||||
handler_class = JohnHandler
|
handler_class = JohnHandler
|
||||||
|
|
Loading…
Reference in New Issue