test_chat.py 313 B

1234567891011
  1. import asyncio
  2. import httpx
  3. import uuid
  4. async def test():
  5. async with httpx.AsyncClient() as client:
  6. resp = await client.post("http://127.0.0.1:8001/chat", json={"message": "列举你的tool", "chat_id": uuid.uuid4().hex})
  7. print(resp.status_code)
  8. print(resp.text)
  9. asyncio.run(test())