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
optimizer= response.parse() # get the object that `optimizer.select_model()` would have returned
328
-
print(optimizer)
278
+
client= response.parse() # get the object that `retrieve_root()` would have returned
279
+
print(client)
329
280
```
330
281
331
282
These methods return an [`APIResponse`](https://github.com/Not-Diamond/not-diamond-python/tree/main/src/not_diamond/_response.py) object.
@@ -339,15 +290,7 @@ The above interface eagerly reads the full response body when you make the reque
339
290
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.
340
291
341
292
```python
342
-
with client.optimizer.with_streaming_response.select_model(
343
-
llm_providers=[
344
-
{
345
-
"model": "model",
346
-
"provider": "provider",
347
-
}
348
-
],
349
-
messages=[{"foo": "string"}],
350
-
) as response:
293
+
with client.with_streaming_response.retrieve_root() as response:
0 commit comments