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
The Not Diamond Python library provides convenient access to the Not Diamond REST API from any Python 3.8+
7
7
application. The library includes type definitions for all request params and response fields,
@@ -11,15 +11,18 @@ It is generated with [Stainless](https://www.stainless.com/).
11
11
12
12
## Documentation
13
13
14
-
The REST API documentation can be found on [docs.notdiamond.ai](https://docs.notdiamond.ai). The full API of this library can be found in [api.md](api.md).
14
+
The full API of this library can be found in [api.md](api.md).
routing= response.parse() # get the object that `routing.select_model()` would have returned
461
-
print(routing.providers)
448
+
model_router= response.parse() # get the object that `model_router.select_model()` would have returned
449
+
print(model_router.providers)
462
450
```
463
451
464
452
These methods return an [`APIResponse`](https://github.com/Not-Diamond/not-diamond-python/tree/main/src/not_diamond/_response.py) object.
@@ -472,7 +460,7 @@ The above interface eagerly reads the full response body when you make the reque
472
460
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.
473
461
474
462
```python
475
-
with client.routing.with_streaming_response.select_model(
463
+
with client.model_router.with_streaming_response.select_model(
0 commit comments