Update main.py
This commit is contained in:
@@ -1,26 +1,8 @@
|
|||||||
"""
|
"""
|
||||||
Simple CLI to chat with the RAG agent.
|
Entry point for the RAG agent.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
from agent import main
|
||||||
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__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user