Download test_client.py from utkarshsinha/openenv-customer-support: direct link, hf CLI and curl.
- Browser
- Download file 486 Bytes
-
https://huggingface.co/spaces/utkarshsinha/openenv-customer-support/resolve/main/test_client.py
- Command line
-
hf download hf://spaces/utkarshsinha/openenv-customer-support/test_client.py
-
curl -L -o test_client.py https://huggingface.co/spaces/utkarshsinha/openenv-customer-support/resolve/main/test_client.py
486 Bytes
| import asyncio | |
| import os | |
| import json | |
| from client import CustomerSupportEnv | |
| from models import CustomerSupportAction | |
| async def main(): | |
| os.environ["TASK_NAME"] = "task1" | |
| env = CustomerSupportEnv(base_url="http://localhost:8001") | |
| res = await env.reset() | |
| print("RESET RESULT:", res) | |
| action = CustomerSupportAction(action_type="assign", department="TechSupport", priority="High") | |
| res = await env.step(action) | |
| print("STEP RESULT:", res) | |
| asyncio.run(main()) | |