From 69b409d35d918b77e8e6df04a1643c980503453d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D0=B8=D0=BD=D0=B0=D1=80=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0=D0=B3=D0=B8=D1=82=D0=BE=D0=B2?= Date: Thu, 11 Jun 2026 09:16:15 +0000 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=88=D0=B5=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D0=B3=D0=BE=D1=82=D0=BE=D0=B2=D0=BE=20=D0=BA=20=D0=BF=D1=83?= =?UTF-8?q?=D0=B1=D0=BB=D0=B8=D0=BA=D0=B0=D1=86=D0=B8=D0=B8:=20add=20main.?= =?UTF-8?q?py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..dde65b4 --- /dev/null +++ b/main.py @@ -0,0 +1,20 @@ +""" +Simple chat loop for the RAG agent. +""" + +import os +from langchain.agents import AgentExecutor +from agent import agent + +# Create executor with memory +executor = AgentExecutor(agent=agent, verbose=True) + +print("RAG‑Agent ready. Type 'exit' to quit.") +while True: + user_input = input("You: ") + if user_input.lower() in {"exit", "quit"}: + break + result = executor.invoke({"input": user_input}) + # The agent returns a dict with keys 'output' and possibly tool calls. + print(f"Assistant: {result.get('output', '')}") +print("Goodbye!")