You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
agent= response.parse() # get the object that `agents.retrieve()` would have returned
251
-
print(agent.id)
238
+
task= response.parse() # get the object that `tasks.list()` would have returned
239
+
print(task)
252
240
```
253
241
254
242
These methods return an [`APIResponse`](https://github.com/scaleapi/agentex-python/tree/main/src/agentex/_response.py) object.
@@ -262,9 +250,7 @@ The above interface eagerly reads the full response body when you make the reque
262
250
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
263
251
264
252
```python
265
-
with client.agents.with_streaming_response.retrieve(
266
-
"agent_id",
267
-
) as response:
253
+
with client.tasks.with_streaming_response.list() as response:
0 commit comments