From 316cdff63fddf61db58e5f59273529c0ae233b40 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: Tue, 2 Jun 2026 07:18:55 +0000 Subject: [PATCH] Update main.py --- main.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index c550b80..78d317c 100644 --- a/main.py +++ b/main.py @@ -1,8 +1,19 @@ -""" -Entry point for the RAG agent. +"""Entry point for the RAG agent. + +This script simply imports and runs the chat loop defined in ``agent.py``. """ -from agent import main +from agent import agent_executor if __name__ == "__main__": - main() + print("RAG Agent ready. Type 'exit' to quit.") + while True: + user_input = input("Запрос: ") + if user_input.lower() in {"exit", "quit", "q"}: + print("Bye!") + break + try: + result = agent_executor.invoke({"input": user_input}) + print(result["output"]) + except Exception as e: + print(f"Error: {e}")