We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import aiml import os import argparse
parser = argparse.ArgumentParser() parser.add_argument("question",help="Go ahead with your question!") args = parser.parse_args() kernel = aiml.Kernel() kernel.verbose(False) kernel.setBotPredicate("name", "Rebecca") if os.path.isfile("bot_brain.brn"): kernel.bootstrap(brainFile = "bot_brain.brn") else: kernel.bootstrap(learnFiles = "startup.xml", commands = "'LOAD AIML B") kernel.saveBrain("bot_brain.brn")
kernel.respond(args.question) kernel.saveBrain("bot_brain.brn")
error
(venv) (base) C:\REZA\TUGAS REZA\chatbot15>py brain.py usage: brain.py [-h] question brain.py: error: the following arguments are required: question
The text was updated successfully, but these errors were encountered:
i get this
File "D:\downloads\simple-chat-bot-master\brain.py", line 18 print kernel.respond(args.question) ---------- ^ SyntaxError: invalid syntax
Sorry, something went wrong.
No branches or pull requests
import aiml
import os
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("question",help="Go ahead with your question!")
args = parser.parse_args()
kernel = aiml.Kernel()
kernel.verbose(False)
kernel.setBotPredicate("name", "Rebecca")
if os.path.isfile("bot_brain.brn"):
kernel.bootstrap(brainFile = "bot_brain.brn")
else:
kernel.bootstrap(learnFiles = "startup.xml", commands = "'LOAD AIML B")
kernel.saveBrain("bot_brain.brn")
kernel now ready for use
kernel.respond(args.question)
kernel.saveBrain("bot_brain.brn")
error
(venv) (base) C:\REZA\TUGAS REZA\chatbot15>py brain.py
usage: brain.py [-h] question
brain.py: error: the following arguments are required: question
The text was updated successfully, but these errors were encountered: