llmOS-Agent / run.py
minchyeom's picture
Implement code changes to enhance functionality and improve performance
0328eb1
raw
history blame
895 Bytes
from __future__ import annotations
import asyncio
from src.chat import ChatSession
async def _main() -> None:
async with ChatSession(user="demo_user", session="demo_session") as chat:
# doc_path = chat.upload_document("note.pdf")
# print(f"Document uploaded to VM at: {doc_path}")
# answer = await chat.chat(f"Remove all contents of test.txt and add the text 'Hello, World!' to it.")
# async for resp in chat.chat_stream("Erase the contents of test.txt and write 'Hello, World!' to it."):
# async for resp in chat.chat_stream("Verify that the file test.txt exists and contains the text 'Hello, World!'."):
async for resp in chat.chat_stream("Inspect the contents of note.pdf and summarize it."):
print("\n>>>", resp)
if __name__ == "__main__":
try:
asyncio.run(_main())
except KeyboardInterrupt:
pass