CoolFace
Apppublic

sc-likes-to-code/openenv-customer-support-env

sourceHugging Facemitupdated 6mo agoView on Hugging Face
0likes
client.py17 linesDownload Raw Back to root
1import requests2 3class SupportEnvClient:4    def __init__(self, base_url="http://localhost:7860"):5        self.base_url = base_url6 7    def reset(self, task="easy"):8        response = requests.post(f"{self.base_url}/reset", params={"task": task})9        return response.json()10 11    def step(self, action: dict):12        response = requests.post(f"{self.base_url}/step", json=action)13        return response.json()14 15    def state(self):16        response = requests.get(f"{self.base_url}/state")17        return response.json()