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
{{ message }}
Repository navigation
Commit 7e7c967
Browse filesBrowse the repository at this point in the historyBrowse files
*[create](docs/sdks/betaagents/README.md#create) - Create a agent that can be used within a conversation.
501
-
*[list](docs/sdks/betaagents/README.md#list) - List agent entities.
502
+
*[~~list~~](docs/sdks/betaagents/README.md#list) - List agent entities. :warning:**Deprecated** Use [list_pages](docs/sdks/betaagents/README.md#list_pages) instead.
503
+
*[list_pages](docs/sdks/betaagents/README.md#list_pages) - List agent entities, cursor-paginated.
502
504
*[get](docs/sdks/betaagents/README.md#get) - Retrieve an agent entity.
503
505
*[update](docs/sdks/betaagents/README.md#update) - Update an agent entity.
504
506
*[delete](docs/sdks/betaagents/README.md#delete) - Delete an agent entity.
*[create_or_update_workspace_credentials](docs/sdks/connectors/README.md#create_or_update_workspace_credentials) - Create or update workspace credentials for a connector.
531
533
*[list_user_credentials](docs/sdks/connectors/README.md#list_user_credentials) - List user credentials for a connector.
532
534
*[create_or_update_user_credentials](docs/sdks/connectors/README.md#create_or_update_user_credentials) - Create or update user credentials for a connector.
535
+
*[delete_all_user_credentials](docs/sdks/connectors/README.md#delete_all_user_credentials) - Delete all user credentials for a connector.
533
536
*[delete_organization_credentials](docs/sdks/connectors/README.md#delete_organization_credentials) - Delete organization credentials for a connector.
534
537
*[delete_workspace_credentials](docs/sdks/connectors/README.md#delete_workspace_credentials) - Delete workspace credentials for a connector.
535
538
*[delete_user_credentials](docs/sdks/connectors/README.md#delete_user_credentials) - Delete user credentials for a connector.
<!-- End Server-sent event streaming [eventstream] -->
878
885
886
+
<!-- Start Json Streaming [jsonl] -->
887
+
## Json Streaming
888
+
889
+
Json Streaming ([jsonl][jsonl-format] / [x-ndjson][x-ndjson]) content type can be used to stream content from certain operations. These operations will expose the stream as [Generator][generator] that
890
+
can be consumed using a simple `for` loop. The loop will
891
+
terminate when the server no longer has any events to send and closes the
892
+
underlying connection.
893
+
894
+
The stream is also a [Context Manager][context-manager] and can be used with the `with` statement and will close the
895
+
underlying connection when the context is exited.
896
+
897
+
```python
898
+
from mistralai.client import Mistral
899
+
import os
900
+
901
+
902
+
with Mistral(
903
+
api_key=os.getenv("MISTRAL_API_KEY", ""),
904
+
) as mistral:
905
+
906
+
res = mistral.beta.rag.search_indexes.generate_index_summary(index_id="b0cfd77c-9cc3-46b6-ad70-1024386259b9", language="pl")
**Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**:
1048
-
*[`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 146 of 243 methods.*
1049
-
*[`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 57 of 243 methods.*
1090
+
*[`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 152 of 249 methods.*
1091
+
*[`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 57 of 249 methods.*
1050
1092
*[`ResponseValidationError`](./src/mistralai/client/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
1051
1093
1052
1094
</details>
@@ -1061,9 +1103,11 @@ with Mistral(
1061
1103
1062
1104
You can override the default server globally by passing a server name to the `server: str` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers:
|`page_token`|*OptionalNullable[str]*|:heavy_minus_sign:| Opaque cursor from a previous response's next_page_token. When set, results page forward from the cursor. |
0 commit comments