Spaces:
Sleeping
Sleeping
eeshwar143 commited on
Commit ·
9be17b9
1
Parent(s): a979929
Wrap HTTP step payloads in OpenEnv StepRequest format
Browse files
support_queue_env/client.py
CHANGED
|
@@ -133,7 +133,11 @@ class SupportQueueEnv:
|
|
| 133 |
return await asyncio.to_thread(self.reset_sync, **kwargs)
|
| 134 |
|
| 135 |
def step_sync(self, action: SupportQueueAction) -> _Result:
|
| 136 |
-
response = requests.post(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 137 |
response.raise_for_status()
|
| 138 |
return _Result(response.json())
|
| 139 |
|
|
|
|
| 133 |
return await asyncio.to_thread(self.reset_sync, **kwargs)
|
| 134 |
|
| 135 |
def step_sync(self, action: SupportQueueAction) -> _Result:
|
| 136 |
+
response = requests.post(
|
| 137 |
+
f"{self.base_url}/step",
|
| 138 |
+
json={"action": action.model_dump()},
|
| 139 |
+
timeout=30,
|
| 140 |
+
)
|
| 141 |
response.raise_for_status()
|
| 142 |
return _Result(response.json())
|
| 143 |
|