MindBot-v0 / main.py
Chirag20's picture
added knowledge
edabb92
raw
history blame contribute delete
568 Bytes
from query import ask_question
def run():
print("Ready. Ask your questions (type 'exit' to quit)\n")
while True:
question = input(">> ").strip()
if question.lower() == "exit":
break
if not question:
continue
answer, docs = ask_question(question)
print("\nAnswer:\n", answer)
# Optional: show sources (very useful for debugging)
print("\nSources:")
for doc in docs:
print("-", doc.metadata.get("book", "Unknown"))
if __name__ == "__main__":
run()