From 3d0e1c3713bf8f3b1a6e67fe7b1afdf7ca61d535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A0=D0=BE=D0=BC?= =?UTF-8?q?=D0=B0=D0=BD=D0=BE=D0=B2?= Date: Mon, 1 Jun 2026 17:40:35 +0000 Subject: [PATCH] Add main.py --- main.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..a160896 --- /dev/null +++ b/main.py @@ -0,0 +1,26 @@ +""" +Simple CLI to chat with the RAG agent. +""" + +import os +import sys + +from agent import agent_executor + +def main(): + print("Welcome to the RAG agent. Type 'exit' to quit.") + while True: + try: + user_input = input("\nQuery: ") + except (KeyboardInterrupt, EOFError): + print("\nExiting.") + break + if user_input.strip().lower() in {"exit", "quit", "q"}: + print("Goodbye!") + break + # Run agent + response = agent_executor.run(user_input) + print("\nAnswer:\n", response) + +if __name__ == "__main__": + main() \ No newline at end of file