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

A bug fix, so that it does not error out in line 45 #2160

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Added an indexing to the response in line 45
The line 45 would error out cz `response` is a tuple, and a tuple does not have any attribute named `text`...
  • Loading branch information
Hunter2809 authored May 13, 2021
commit 73bc4e610f92e28cc13ae52c653eb52b7aae4037
3 changes: 1 addition & 2 deletions examples/learning_feedback_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,13 @@ def get_feedback():
)

print('\n Is "{}" a coherent response to "{}"? \n'.format(
response.text,
response[0].text,
input_statement.text
))
if get_feedback() is False:
print('please input the correct one')
correct_response = Statement(text=input())
bot.learn_response(correct_response, input_statement)
print('Responses added to bot!')

# Press ctrl-c or ctrl-d on the keyboard to exit
except (KeyboardInterrupt, EOFError, SystemExit):
Expand Down