'Either a statement object or a "text" keyword '
chatterbot.chatterbot.ChatBot.ChatBotException: Either a statement object or a "text" keyword argument is required. Neither was provided.
Hi all. I am having a bug with getting my Chatterbot started. I was wondering if you all could help. I am posting my error message below
File "d:\TwitterBot1\Bot1.py", line 123, in <module>
bot = ChatBot('Bot1')
File "D:\Python\lib\site-packages\chatterbot\chatterbot.py", line 34, in init
self.storage = utils.initialize_class(storage_adapter, kwargs)
File "D:\Python\lib\site-packages\chatterbot\utils.py", line 54, in initialize_class
return Class(*args, kwargs)
File "D:\Python\lib\site-packages\chatterbot\storage\sql_storage.py", line 22, in init
from sqlalchemy import create_engine
File "D:\Python\lib\site-packages\sqlalchemy__init.py", line 8, in <module>
from . import util as _util # noqa
ImportError: cannot import name 'util' from partially initialized module 'sqlalchemy' (most likely due to a circular import) (D:\Python\lib\site-packages\sqlalchemy\init__.py)
Does anyone know the fix to this issue?
Hi could anyone give me a tip on how to make the specific response example work?
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer
# Create a new instance of a ChatBot
chatbot = ChatBot(
'Exact Response Example Bot',
storage_adapter='chatterbot.storage.SQLStorageAdapter',
logic_adapters=[
{
'import_path': 'chatterbot.logic.BestMatch'
},
{
'import_path': 'chatterbot.logic.SpecificResponseAdapter',
'input_text': 'Help me!',
'output_text': 'Ok, here is a link: http://chatterbot.rtfd.org'
}
]
)
# Create a new trainer for the chatbot
trainer = ChatterBotCorpusTrainer(chatbot)
# Train the chatbot based on the english corpus
trainer.train("chatterbot.corpus.english")
Am just experimenting in Flask, this is what it looks like below. Any ideas to try??
Actually am finding results for a specific response with ListTrainer
seems to work great. Just curious if anyone else has any incite on this, for example:
chatbot = ChatBot('Example Bot')
# Start by training our bot with the ChatterBot corpus data
trainer = ListTrainer(chatbot)
trainer.train([
'ILC',
'let me check one second.',
])
# You can train with a second list of data to add response variations
trainer.train([
'help',
'Ok, here is a link to PNNLs website: https://www.pnnl.gov/intelligent-load-control'
])
# Create a new trainer for the chatbot
trainer = ChatterBotCorpusTrainer(chatbot)
# Train the chatbot based on the english corpus
trainer.train("chatterbot.corpus.english")
This seems to give me a specific response for ILC
and help