Update main.py
This commit is contained in:
@@ -1,19 +1,10 @@
|
|||||||
"""Entry point for the RAG agent.
|
"""
|
||||||
|
Entry point for the RAG agent. Delegates to agent.py.
|
||||||
This script simply imports and runs the chat loop defined in ``agent.py``.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from agent import agent_executor
|
import sys
|
||||||
|
|
||||||
|
from agent import __main__ as agent_main
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
print("RAG Agent ready. Type 'exit' to quit.")
|
agent_main()
|
||||||
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}")
|
|
||||||
|
|||||||
Reference in New Issue
Block a user