Open SpicyPen1992 opened 5 years ago
@gunthercox I have the same issue. Did you check it already?
Sorry, I haven't had a chance to look into this yet. It's amazing how fast time goes by!
I have the same Issue here aswell. I had a look into the database the bot uses and it adds the information of the learned statement correctly. But somehow the search doesn't work correctly. Additionally I'm always getting a confidence value of 0. If you need further details, I'll would like provide them to help to fix the bug. I've already checked the source code but except for #1589 and #1608 I couldn't find anything propably related to this problem.
Hello Everybody, I have a simple workaround how somebody still can train the bot on demand:
trainer= ListTrainer(bot)
def get_feedback():
if 'stop' == str(input_statement):
return False
last_input_statement=[]
while True:
try:
input_statement = (input(bcolors.bold + "You: " + bcolors.endc))
response = bot.get_response(input_statement)
if get_feedback() is False:
print("Please enter something more funny")
correct_response = input()
last_input_statement.append(correct_response)
trainer.train(last_input_statement)
print("Response added to Chatbot")
last_input_statement.clear()
else:
last_input_statement.clear()
last_input_statement.append(str(input_statement))
print(bcolors.bold + "Chatty: "+ bcolors.endc + str(response))
# Press ctrl-c or ctrl-d on the keyboard to exit
except (KeyboardInterrupt, EOFError, SystemExit):
print(bcolors.fail + " Bye!" + bcolors.endc)
break
Dear gunthercox: My English is not very good. If the statement is not smooth, please forgive me.
After updating the new version 1.0.0, I found that ChatterBot could not complete the feedback learning. By looking https://github.com/gunthercox/ChatterBot/issues/1553, I also found that this issue may not only in the new version. After chatbot train first, i run my code:
Begin feedback learning: User: What is the game of Saint Setya? Bot: Is "What is the game of Saint Setya?" "What is Saint Setya?"'s real response? User:n Please input real response: User(real):The Saint Seiya is a game released by Leju Company. Bot: study+1 User:What is the game of Saint Setya? Bot: Is "What is the game of Saint Setya?" "What is Saint Setya?"'s real response?
As a newbie, I hope the author can improve the ChatterBot or give me some guidance. Thank you very much.
My code as follow: (PS:saintseiya.yml likes ai.yml)