20 lines
503 B
Python
20 lines
503 B
Python
"""
|
|
Simple CLI for interacting with the RAG agent.
|
|
"""
|
|
import asyncio
|
|
from langchain_core.messages import HumanMessage
|
|
from agent import run_agent
|
|
|
|
async def main():
|
|
print("RAG Agent CLI. Type /quit to exit.")
|
|
while True:
|
|
user_input = input("You: ")
|
|
if user_input.strip() == "/quit":
|
|
break
|
|
msg = HumanMessage(content=user_input)
|
|
response = await run_agent([msg])
|
|
print(f"Agent: {response}")
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(main())
|